2016-12-15 2 views
-1

Ich habe Probleme beim Erstellen von Partitionen für eine Tabelle mit Geodaten (d. H. Form Spalte). Ich habe ein Tabellengebäude, das Geodaten hat, und ich möchte eine Partition auf der Grundlage von statusname erstellen.Partitionierung von Geodaten im Stock

habe ich eine Tabelle als buildingpartiton

SET hive.exec.dynamic.partition=true; 
SET hive.exec.dynamic.partition.mode=non-strict; 

create table buildingpartition (OBJECTID string, 
> RILUNIQUEID string, 
> RILFEATURECODE string, 
> BLDGNO string, 
> BLDGNAME string, 
> BLDGTYPE string, 
> BLDGSUBTYPE string, 
> BLDGCLASS string, 
> BLDGROAD string, 
> BLDGSUBROAD string, 
> SUBLOCALITY string, 
> BLDGSIZE string, 
> TAG string, 
> PINCODE string, 
> NUMBEROFFLATS string, 
> NUMBEROFSHOPS string, 
> BLDG_TYPE string, 
> CABLEOPERATORNAME string, 
> AREA_1 string, 
> LBU2 string, 
> SHAPE binary) 
> Partitioned by (STATENAME string) 
> ROW FORMAT SERDE 'com.esri.hadoop.hive.serde.JsonSerde' 
> STORED AS INPUTFORMAT 'com.esri.json.hadoop.UnenclosedJsonInputFormat' 
> OUTPUTFORMAT'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'; 

Dann folgt i versucht, Daten in dieser Tabelle aus einem vorhandenen Gebäude Tabelle einzufügen. Dieser Gebäudetisch besteht aus 40 Millionen Datensätzen.

> Insert into table buildingpartition parition (statename) select * from building; 

Ich erhalte die Hauptursache für den Fehler als

Verursacht durch: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata. HiveException: org.apache.hadoop.ipc.RemoteException (org.apache.hadoop.hdfs.protocol.FSLimitException $ PathComponentTooLongException): Der maximale Name der Pfadkomponentenbezeichnung von statutename = 00 00 00 00 03 05 00 00 00 00 83 54 0b b0 17 22 41 f0 6d 9e 04 7b 61 43 41 c0 84 25 eb ed 17 22 41 a0 82 cd c2 80 61 43 41 01 00 00 00 05 00 00 00 00 00 00 00 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 40 a0 a2 83 ed 17 22 41 a0 82 cd c2 80 61 43 41 c0 84 25 eb ed 17 22 41 70 a7 13 4d 7b 61 43 41 40 c9 31 72 b0 17 22 41 f0 6d 9e 04 7b 61 43 41 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 im Verzeichnis /apps/hive/warehouse/proddb.db/buildingpartition/.hive-staging_hive_2016-12-15_10-58-15_294_7141760028369054723-1/ _task_tmp.-ext-10002 ist überschritten: limit = 255 length = 408

Kann mir jemand bei diesem Problem helfen? Ich habe die vollständige Fehlerspur unten angehängt. Jede Hilfe wäre willkommen. Dank

Fehler: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error während Zeile Verarbeitung { "objectid": null, "riluniqueid": "KOL_A_LO0000_0597215",“ rilfeaturecode ":" LO0000 "," bldgno ":" null "," bldgname ":" null "," bldgtype ":" 1 "," bldgsubtype ":" Nicht klassifiziert "," bldgclass ":" Gebäude "," bldgroad " : "PURANO BAZAR BRÜCKE", "bldgsubroad": "PK VISHWAS ROAD", "Unterlage": "Milan Garh Colony", "Staatsname": "Westbengalen", "bldgsize": "G + 0", "tag": "null", "pincode": "700119", "numberofflats": "0", "numberofshops": "0", "bldg_type": "Andere", "cableoperatorname": "null", "area_1": "0.0 "," lbu2 ":" null "," shape ": T " A m {aCA % "A aCA T " AIXz aCA @ "A aCA % "Ap M {aCA @ 1r " A m {aCA T "AIXz aCA} bei org.apache.hadoop.hive.ql.exe.mr.ExecMapper.map (ExecMapper. Java: 172) bei org.apache.hadoop.mapred.MapRunner.run (MapRunner.java:54) bei org.apache.hadoop.mapred.MapTask.runOldMapper (MapTask.java:453) bei org.apache. hadoop.mapred.MapTask.run (MapTask.java:343) bei org.apache.hadoop.mapred.YarnChild $ 2.run (YarnChild.java:168) bei java.security.AccessController.doPrivileged (native Methode) um javax.security.auth.Subject.doAs (Betreff.java:422) bei org.apache.hadoop.security.UserGroupInformation.doAs (UserGroupInformation.java:1709) bei org.apache.hadoop.mapred.YarnChild.main (GarnChild.java:162) verursacht durch: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error während der Verarbeitung der Zeile {"objectid": null, "riluniqueid": "KOL_A_LO0000_0597215", "rilfeaturecode": "LO0000", "bldgno" : "null", "bldgname": "null", "bldgtype": "1", "bldgsubtype": "Nicht klassifiziert", "bldgclass": "Gebäude", "bldgroad": "PURANO BAZAR BRIDGE", "bldgsubroad" : "PK VISHWAS ROAD", "Unterlage": "Milan Garh Colony", "Staatsname": "Westbengalen", "bldgsize": "G + 0", "tag": "null", "pincode": "700119 "," numberofflats ":" 0 "," numberofshops ":" 0 "," bldg_type ":" Andere "," cableoperatorname ":" null "," area_1 ":" 0.0 "," lbu2 ":" null "," shape ": T " A m {aCA % "A aCA T " AIXz aCA @ "A aCA % " Ap M {aCA @ 1r "A m {aCA T " AIXz aCA} bei org.apache.hadoop.hive.ql .exec.MapOperator.process (MapOperator.java:562) bei org.apache.hadoop.hive.ql.exe.mc.ExecMapper.map (ExecMapper.java:163) ... 8 mehr verursacht durch: org.apache.hadoop.hive.ql.metada.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.ipc.RemoteException (org.apache.hadoop.hdfs.protocol.FSLimitException $ PathComponentTooLongException): Der maximale Pfadkomponenten-Namenslimit von statutename = 00 00 00 00 03 05 00 0 0 00 00 83 54 0b b0 17 22 41 f0 6d 9e 04 7b 61 43 41 c0 84 25 eb ed 17 22 41 a0 82 cd c2 80 61 43 41 01 00 00 00 05 00 00 00 00 00 00 00 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 40 a0 a2 83 ed 17 22 41 a0 82 cd c2 80 61 43 41 c0 84 25 eb ed 17 22 41 70 a7 13 4d 7b 61 43 41 40 c9 31 72 b0 17 22 41 f0 6d 9e 04 7b 61 43 41 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 im Verzeichnis /apps/hive/warehouse/proddb.db/buildingpartition/.hive-staging_hive_2016-12-15_10- 58-15_294_7141760028369054723-1/_task_tmp.-ext-10002 ist überschritten: limit = 255 length = 408 bei org.apache.hadoop.hdfs.server.namenode.FSDirectory.verifyMaxComponentLength (FSDirectory.java:949) bei org. apache.hadoop.hdfs.server.namenode.FSDirectory.addLastINode (FSDirectory.java:1014) bei org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.unprotectedMkdir (FSDirMkdirOp.java:237) bei org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.createSingleDirectory (FSDirMkdirOp.java:191) bei org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.createChildrenDirectories (FSDirMkdirOp.java:166) bei org.apache.hadoop.hdfs.server.namendeode.FSDirMkdirOp.createAncestorDirectories (FSDirMkdirOp.java:134) bei org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFileInternal (FSNamesystem.java:2615) bei org. apache.hadoop.hdfs.server.namenode.FSNamesystem.startFileInt (FSNamesystem.java:2493) bei org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFile (FSNamesystem.java:2377) bei org.apache. hadoop.hdfs.server.namenode.NameNodeRpcServer.create (NameNodeRpcServer.java:708) bei org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTr anslatorPB.create (ClientNamenodeProtocolServerSideTranslatorPB.java:405) bei org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos $ ClientNamenodeProtocol $ 2.callBlockingMethod (ClientNamenodeProtocolProtos.java) bei org.apache.hadoop.ipc.ProtobufRpcEngine $ Server $ ProtoBufRpcInvoker .call (ProtobufRpcEngine.java:616) bei org.apache.hadoop.ipc.RPC $ Server.call (RPC.java:969) bei org.apache.hadoop.ipc.Server $ Handler $ 1.run (Server. java: 2206) bei org.apache.hadoop.ipc.Server $ Handler $ 1.run (Server.java:2202) bei java.security.AccessController.doPrivileged (Native Methode) bei javax.security.auth.Subject. doAs (Subject.java:422) bei org.apache.hadoop.security.UserGroupInformation.doAs (UserGroupInformation.java:1709) bei org.apache.hadoop.ipc.Server $ Handler.run (Server.java:2200) bei org.apache.hadoop.hive.ql.exec.FileSinkOperator.createBucketFiles (FileSinkOperator.java:577) bei org. apache.hadoop.hive.ql.exec.FileSinkOperator.createNewPaths (FileSinkOperator.java:859) bei org.apache.hadoop.hive.ql.exec.FileSinkOperator.getDynOutPaths (FileSinkOperator.java:966) bei org.apache. hadoop.hive.ql.exec.FileSinkOperator.process (FileSinkOperator.java:709) bei org.apache.hadoop.hive.ql.exe.Operator.forward (Operator.java:838) bei org.apache.hadoop. hive.ql.exec.SelectOperator.process (SelectOperator.java:88) bei org.apache.hadoop.hive.ql.exe.Operator.forward (Operator.java:838) bei org.apache.hadoop.hive. ql.exe.TableScanOperator.process (TableScanOperator.java:117) bei org.apache.hadoop.hive.ql.exec.MapOperator $ MapOpCtx.forward (MapOperator.java:167) bei org.apache.hadoop.hive.ql.exec.MapOperator.process (MapOperator.java:552) ... 9 mehr verursacht durch: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.ipc.RemoteException (org.apache.hadoop.hdfs.protocol.FSLimitException $ PathComponentTooLongException): Der maximale Name der Pfadkomponente Grenze des Staatenamens = 00 00 00 00 03 05 00 00 00 00 83 54 0b b0 17 22 41 f0 6d 9e 04 7b 61 43 41 c0 84 25 eb ed 17 22 41 a0 82 cd c2 80 61 43 41 01 00 00 00 05 0000 00 00 00 00 00 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 40 a0 a2 83 ed 17 22 41 a0 82 cd c2 80 61 43 41 c0 84 25 eb ed 17 22 41 70 a7 13 4d 7b 61 43 41 40 c9 31 72 b0 17 22 41 f0 6d 9e 04 7b 61 43 41 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 im Verzeichnis /apps/hive/warehouse/proddb.db/ buildingpartition/.hive-staging_hive_2016-12-15_10-58-15_294_ 7141760028369054723-1/_task_tmp.-ext-10002 ist überschritten: limit = 255 length = 408 bei org.apache.hadoop.hdfs.server.namenkode.FSDirectory.verifyMaxComponentLength (FSDirectory.java:949) bei org.apache.hadoop .hdfs.server.namenode.FSDirectory.addLastINode (FSDirectory.java:1014) bei org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.unprotectedMkdir (FSDirMkdirOp.java:237) bei org.apache.hadoop.hdfs .server.namenode.FSDirMkdirOp.createSingleDirectory (FSDirMkdirOp.java:191) bei org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.createChildrenDirectories (FSDirMkdirOp.java:166) bei org.apache.hadoop.hdfs.server .namenode.FSDirMkdirOp.createAncestorDirectories (FSDirMkdirOp.java:134) bei org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFileInternal (FSNamesystem.java: 2615) bei org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFileInt (FSNamesystem.java:2493) bei org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFile (FSNamesystem.java:2377) bei org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.create (NameNodeRpcServer.java:708) bei org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.create (ClientNamenodeProtocolServerSideTranslatorPB.java:405) bei org. apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos $ ClientNamenodeProtocol $ 2.callBlockingMethod (ClientNamenodeProtocolProtos.java) bei org.apache.hadoop.ipc.ProtobufRpcEngine $ Server $ ProtoBufRpcInvoker.call (ProtobufRpcEngine.java:616) bei org.apache .hadoop.ipc.RPC $ Server.call (RPC.java:969) unter org.apache.hadoop.ipc.Server $ Handler $ 1.run (Server.java:2206) unter org.apache.hadoop.ipc.Server $ Handler $ 1.run (Server.java:2202) bei java. security.AccessController.doPrivileged (Native Methode) bei javax.security.auth.Subject.doAs (Subject.java:422) bei org.apache.hadoop.security.UserGroupInformation.doAs (UserGroupInformation.java:1709) bei org .apache.hadoop.ipc.Server $ Handler.run (Server.java:2200) bei org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getHiveRecordWriter (HiveFileFormatUtils.java:249) bei org.apache.hadoop .hive.ql.exec.FileSinkOperator.createBucketForFileIdx (FileSinkOperator.java:622) bei org.apache.hadoop.hive.ql.exe.FileSinkOperator.createBucketFiles (FileSinkOperator.java:566) ... 18 mehr verursacht durch: org.apache.hadoop.ipc.RemoteException (org.apache.hadoop.hdfs.protocol.FSLimitException $ PathComponentTooLongException): Der maximale Name der Pfadkomponenten-Bezeichnung von statutename = 00 00 00 00 03 05 00 00 00 00 83 54 0b b0 17 22 41 f0 6d 9e 04 7b 61 43 41 c0 84 25 eb ed 17 22 41 a0 82 cd c2 80 61 43 41 01 00 00 00 05 00 00 00 00 00 00 00 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 40 a0 a2 83 ed 17 22 41 a0 82 cd c2 80 61 43 41 c0 84 25 eb ed 17 22 41 70 a7 13 4d 7b 61 43 41 40 c9 31 72 b0 17 22 41 f0 6d 9e 04 7b 61 43 41 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 im Verzeichnis /apps/hive/warehouse/proddb.db/buildingpartition/.hive-staging_hive_2016-12-15_10- 58-15_294_7141760028369054723-1/_task_tmp.-ext-10002 ist überschritten: limit = 255 length = 408 bei org.apache.hadoop.hdfs.server.namenkode.FSDirectory.verifyMaxComponentLength (FSDirectory.java:949) bei org.apache .hadoop.hdfs.server.namenode.FSDirectory.addLastINode (FSDirectory.java:1014) bei org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.unprotectedMkdir (FSDirMkdirOp.java:237) bei org.apache.hadoop.hdfs. server.namenode.FSDirMkdirOp.createSingleDirectory (FSDirMkdirOp.java:191) bei org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.createChildrenDirectories (FSDirMkdirOp.java:166) bei org.apache.hadoop.hdfs.server. namenode.FSDirMkdirOp.createAncestorDirectories (FSDirMkdirOp.java:134) bei org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFileInternal (FSNamesystem.java:2615) bei org.apache.hadoop.hdfs.server.namenode. FSNamesystem.startFileInt (FSNamesystem.java:2493) bei org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFile (FSNamesystem.java:2377)bei org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.create (NameNodeRpcServer.java:708) bei org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.create (ClientNamenodeProtocolServerSideTranslatorPB.java:405) bei org. apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos $ ClientNamenodeProtocol $ 2.callBlockingMethod (ClientNamenodeProtocolProtos.java) bei org.apache.hadoop.ipc.ProtobufRpcEngine $ Server $ ProtoBufRpcInvoker.call (ProtobufRpcEngine.java:616) bei org.apache .hadoop.ipc.RPC $ Server.call (RPC.java:969) bei org.apache.hadoop.ipc.Server $ Handler $ 1.run (Server.java:2206) bei org.apache.hadoop.ipc. Server Handler $ $ 1.run (Server.java:2202) bei java.security.AccessController.doPrivileged (native Methode) 01.bei javax.security.auth.Subject.doAs (Subject.java:422) bei org.apache.hadoop.security.UserGroupInformation.doAs (UserGroupInformation.java:1709) bei $ org.apache.hadoop.ipc.Server Handler.run (Server.java:2200) bei org.apache.hadoop.ipc.Client.call (Client.java:1426) bei org.apache.hadoop.ipc.Client.call (Client.java:1363) bei org.apache.hadoop.ipc.ProtobufRpcEngine $ Invoker.invoke (ProtobufRpcEngine.java:229) bei com.sun.proxy. $ Proxy14.create (Unknown Source) bei org.apache.hadoop.hdfs.protocolPB. ClientNamenodeProtocolTranslatorPB.create (ClientNamenodeProtocolTranslatorPB.java:298) bei sun.reflect.NativeMethodAccessorImpl.invoke0 (native Methode) bei sun.reflect.NativeMethodAc cessorImpl.invoke (NativeMethodAccessorImpl.java:62) bei sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) bei java.lang.reflect.Method.invoke (Method.java:498) bei org.apache. hadoop.io.retry.RetryInvocationHandler.invokeMethod (RetryInvocationHandler.java:256) bei org.apache.hadoop.io.retry.RetryInvocationHandler.invoke (RetryInvocationHandler.java:104) bei com.sun.proxy. $ Proxy15.create (Unknown Source) bei org.apache.hadoop.hdfs.DFSOutputStream.newStreamForCreate (DFSOutputStream.java:1716) bei org.apache.hadoop.hdfs.DFSClient.create (DFSClient.java:1703) bei org.apache. hadoop.hdfs.DFSClient.create (DFSClient.java:1638) bei org.apache.hadoop.hdfs.DistributedFileSys Diese $ 7.doCall (DistributedFileSystem.java:449) bei org.apache.hadoop.hdfs.DistributedFileSystem $ 7.doCall (DistributedFileSystem.java:445) bei org.apache.hadoop.fs.FileSystemLinkResolver.resolve (FileSystemLinkResolver.java: 81) bei org.apache.hadoop.hdfs.DistributedFileSystem.create (DistributedFileSystem.java:445) bei org.apache.hadoop.hdfs.DistributedFileSystem.create (DistributedFileSystem.java:388) bei org.apache.hadoop. fs.FileSystem.create (FileSystem.java:909) bei org.apache.hadoop.fs.FileSystem.create (FileSystem.java:802) bei org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat.getHiveRecordWriter (HiveIgnoreKeyTextOutputFormat.java:80) bei org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getRecordWriter (HiveFileFormatUtils.java:261) bei org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getHiveRecordWriter (HiveFileFormatUtils.java:246) ... 20 mehr Container vom ApplicationMaster getötet. Container auf Anfrage getötet. Exit-Code ist 143 Container verlassen mit einem Nicht-Null-Exit-Code 143 FAILED: Ausführungsfehler, Rückgabecode 2 von org.apache.hadoop.hive.ql.exec.mr.MapRedTask

Antwort

0

Es sagt genau dort in Fehler, dass der Name des Partitionsverzeichnisses das Namenskonventionlimit überschreitet -

Der maximale Pfad Komponentennamenslimit von statusname = 00 00 00 00 03 05 00 00 00 00 83 54 0b b0 17 22 41 f0 6d 9e 04 7b 61 43 41 c0 84 25 eb ed 17 22 41 a0 82 cd c2 80 61 43 41 01 00 00 00 05 00 00 00 00 00 00 00 00 83 54 0 b b0 17 22 41 18 49 58 7a 80 61 43 41 40 a0 a2 83 ed 17 22 41 a0 82 cd c2 80 61 43 41 c0 84 25 eb ed 17 22 41 70 a7 13 4d 7b 61 43 41 40 c9 31 72 b0 17 22 41 f0 6 d 9e 04 7b 61 43 41 00 83 54 0b b0 17 22 41 18 49 58 7a 80 61 43 41 im Verzeichnis /apps/hive/warehouse/proddb.db/buildingpartition/.hive-staging_hive_2016-12-15_10-58- 15_294_7141760028369054723-1/_task_tmp.-ext-10002 überschritten wird: limit = 255 Länge = 408 bei org.apache.hadoop.hdfs.server.namenode.FSDirectory.verifyMaxComponentLength (FSDirectory.java:949)

Ihr Tisch wird in der Spalte SHAPE anstatt in der Spalte STATENAME partitioniert, weil Sie mit der Anweisung select * einfügen.

Die Spalte, auf die die Tabelle partitioniert werden soll, muss als letzte Spalte in der Auswahlabfrage erwähnt werden.

richtige Weg, es zu tun ist -

from building 
insert overwrite table buildingpartition partition(statename) 
select col1,col2..... , statename ;