quickstart docker-demo : java.lang.NullPointerException when trying to execute delta-streamer
I am trying to run the first delta-streamer in the quickstart to ingest into stock_ticks_cow and the process is failing with NullPointerException. Complete stack trace below.
Also, Step2 in the doc says that COW and MOR tables are initialized in prior step. Is that expected to be part of demo_setup.sh?
Here, we will use the tool to download json data from kafka topic and ingest to both COW and MOR tables we initialized in the previous step
bash-4.4# spark-submit --class com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer $HUDI_UTILITIES_BUNDLE --storage-type COPY_ON_WRITE --source-class com.uber.hoodie.utilities.sources.JsonKafkaSource --source-ordering-field ts --target-base-path /user/hive/warehouse/stock_ticks_cow --target-table stock_ticks_cow --props /var/demo/config/kafka-source.properties
2019-03-01 03:29:45 WARN NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2019-03-01 03:29:46 INFO SparkContext:54 - Running Spark version 2.3.1
2019-03-01 03:29:46 INFO SparkContext:54 - Submitted application: delta-streamer-stock_ticks_cow
2019-03-01 03:29:46 INFO SecurityManager:54 - Changing view acls to: root
2019-03-01 03:29:46 INFO SecurityManager:54 - Changing modify acls to: root
2019-03-01 03:29:46 INFO SecurityManager:54 - Changing view acls groups to:
2019-03-01 03:29:46 INFO SecurityManager:54 - Changing modify acls groups to:
2019-03-01 03:29:46 INFO SecurityManager:54 - SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); groups with view permissions: Set(); users with modify permissions: Set(root); groups with modify permissions: Set()
2019-03-01 03:29:47 INFO Utils:54 - Successfully started service 'sparkDriver' on port 41853.
2019-03-01 03:29:47 INFO SparkEnv:54 - Registering MapOutputTracker
2019-03-01 03:29:47 INFO SparkEnv:54 - Registering BlockManagerMaster
2019-03-01 03:29:47 INFO BlockManagerMasterEndpoint:54 - Using org.apache.spark.storage.DefaultTopologyMapper for getting topology information
2019-03-01 03:29:47 INFO BlockManagerMasterEndpoint:54 - BlockManagerMasterEndpoint up
2019-03-01 03:29:47 INFO DiskBlockManager:54 - Created local directory at /tmp/blockmgr-966025e1-cccc-4a8d-8a91-609ccd75c5f1
2019-03-01 03:29:47 INFO MemoryStore:54 - MemoryStore started with capacity 366.3 MB
2019-03-01 03:29:47 INFO SparkEnv:54 - Registering OutputCommitCoordinator
2019-03-01 03:29:47 INFO log:192 - Logging initialized @5539ms
2019-03-01 03:29:47 INFO Server:346 - jetty-9.3.z-SNAPSHOT
2019-03-01 03:29:47 INFO Server:414 - Started @5754ms
2019-03-01 03:29:48 INFO AbstractConnector:278 - Started ServerConnector@7bd69e82{HTTP/1.1,[http/1.1]}{0.0.0.0:4040}
2019-03-01 03:29:48 INFO Utils:54 - Successfully started service 'SparkUI' on port 4040.
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@26d10f2e{/jobs,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@5f577419{/jobs/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@28fa700e{/jobs/job,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@e041f0c{/jobs/job/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@6a175569{/stages,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@11963225{/stages/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@3f3c966c{/stages/stage,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@61a5b4ae{/stages/stage/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@3a71c100{/stages/pool,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@5b69fd74{/stages/pool/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@f325091{/storage,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@437e951d{/storage/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@77b325b3{/storage/rdd,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@63a5e46c{/storage/rdd/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@7e8e8651{/environment,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@49ef32e0{/environment/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@271f18d3{/executors,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@6bd51ed8{/executors/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@61e3a1fd{/executors/threadDump,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@51abf713{/executors/threadDump/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@eadb475{/static,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@64b31700{/,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@3b65e559{/api,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@1c05a54d{/jobs/job/kill,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@65ef722a{/stages/stage/kill,null,AVAILABLE,@Spark}
2019-03-01 03:29:48 INFO SparkUI:54 - Bound SparkUI to 0.0.0.0, and started at http://adhoc-2:4040
2019-03-01 03:29:48 INFO deprecation:1173 - mapred.output.compression.codec is deprecated. Instead, use mapreduce.output.fileoutputformat.compress.codec
2019-03-01 03:29:48 INFO deprecation:1173 - mapred.output.compress is deprecated. Instead, use mapreduce.output.fileoutputformat.compress
2019-03-01 03:29:48 INFO deprecation:1173 - mapred.output.compression.type is deprecated. Instead, use mapreduce.output.fileoutputformat.compress.type
2019-03-01 03:29:48 INFO SparkContext:54 - Added JAR file:/var/hoodie/ws/docker/hoodie/hadoop/hive_base/target/hoodie-utilities.jar at spark://adhoc-2:41853/jars/hoodie-utilities.jar with timestamp 1551410988691
2019-03-01 03:29:48 INFO Executor:54 - Starting executor ID driver on host localhost
2019-03-01 03:29:48 INFO Utils:54 - Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 33871.
2019-03-01 03:29:48 INFO NettyBlockTransferService:54 - Server created on adhoc-2:33871
2019-03-01 03:29:48 INFO BlockManager:54 - Using org.apache.spark.storage.RandomBlockReplicationPolicy for block replication policy
2019-03-01 03:29:48 INFO BlockManagerMaster:54 - Registering BlockManager BlockManagerId(driver, adhoc-2, 33871, None)
2019-03-01 03:29:48 INFO BlockManagerMasterEndpoint:54 - Registering block manager adhoc-2:33871 with 366.3 MB RAM, BlockManagerId(driver, adhoc-2, 33871, None)
2019-03-01 03:29:49 INFO BlockManagerMaster:54 - Registered BlockManager BlockManagerId(driver, adhoc-2, 33871, None)
2019-03-01 03:29:49 INFO BlockManager:54 - Initialized BlockManager: BlockManagerId(driver, adhoc-2, 33871, None)
2019-03-01 03:29:49 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@52fc5eb1{/metrics/json,null,AVAILABLE,@Spark}
2019-03-01 03:29:50 INFO FSUtils:89 - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml, __spark_hadoop_conf__.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-1323528034_1, ugi=root (auth:SIMPLE)]]]
2019-03-01 03:29:51 WARN SparkContext:66 - Using an existing SparkContext; some configuration may not take effect.
2019-03-01 03:29:51 INFO FSUtils:89 - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml, __spark_hadoop_conf__.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-1323528034_1, ugi=root (auth:SIMPLE)]]]
2019-03-01 03:29:52 INFO HoodieDeltaStreamer:165 - Creating delta streamer with configs : {hoodie.datasource.write.partitionpath.field=date, auto.offset.reset=smallest, hoodie.bulkinsert.shuffle.parallelism=2, hoodie.upsert.shuffle.parallelism=2, hoodie.deltastreamer.schemaprovider.target.schema.file=/var/demo/config/schema.avsc, hoodie.datasource.write.recordkey.field=key, hoodie.deltastreamer.schemaprovider.source.schema.file=/var/demo/config/schema.avsc, metadata.broker.list=kafkabroker:9092, hoodie.insert.shuffle.parallelism=2, hoodie.deltastreamer.source.kafka.topic=stock_ticks}
2019-03-01 03:29:52 INFO HoodieTableMetaClient:246 - Initializing /user/hive/warehouse/stock_ticks_cow as hoodie dataset /user/hive/warehouse/stock_ticks_cow
2019-03-01 03:29:52 INFO FSUtils:89 - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml, __spark_hadoop_conf__.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-1323528034_1, ugi=root (auth:SIMPLE)]]]
2019-03-01 03:29:53 INFO HoodieTableMetaClient:83 - Loading HoodieTableMetaClient from /user/hive/warehouse/stock_ticks_cow
2019-03-01 03:29:53 INFO FSUtils:89 - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml, __spark_hadoop_conf__.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-1323528034_1, ugi=root (auth:SIMPLE)]]]
2019-03-01 03:29:53 INFO HoodieTableConfig:69 - Loading dataset properties from /user/hive/warehouse/stock_ticks_cow/.hoodie/hoodie.properties
2019-03-01 03:29:53 INFO HoodieTableMetaClient:93 - Finished Loading Table of type COPY_ON_WRITE from /user/hive/warehouse/stock_ticks_cow
2019-03-01 03:29:53 INFO HoodieTableMetaClient:284 - Finished initializing Table of type COPY_ON_WRITE from /user/hive/warehouse/stock_ticks_cow
2019-03-01 03:29:53 INFO HoodieDeltaStreamer:205 - Checkpoint to resume from : Optional.empty
2019-03-01 03:29:53 INFO VerifiableProperties:68 - Verifying properties
2019-03-01 03:29:53 INFO VerifiableProperties:68 - Property auto.offset.reset is overridden to smallest
2019-03-01 03:29:53 INFO VerifiableProperties:68 - Property group.id is overridden to
2019-03-01 03:29:53 WARN VerifiableProperties:83 - Property hoodie.bulkinsert.shuffle.parallelism is not valid
2019-03-01 03:29:53 WARN VerifiableProperties:83 - Property hoodie.datasource.write.partitionpath.field is not valid
2019-03-01 03:29:53 WARN VerifiableProperties:83 - Property hoodie.datasource.write.recordkey.field is not valid
2019-03-01 03:29:53 WARN VerifiableProperties:83 - Property hoodie.deltastreamer.schemaprovider.source.schema.file is not valid
2019-03-01 03:29:53 WARN VerifiableProperties:83 - Property hoodie.deltastreamer.schemaprovider.target.schema.file is not valid
2019-03-01 03:29:53 WARN VerifiableProperties:83 - Property hoodie.deltastreamer.source.kafka.topic is not valid
2019-03-01 03:29:53 WARN VerifiableProperties:83 - Property hoodie.insert.shuffle.parallelism is not valid
2019-03-01 03:29:53 WARN VerifiableProperties:83 - Property hoodie.upsert.shuffle.parallelism is not valid
2019-03-01 03:29:53 INFO VerifiableProperties:68 - Property zookeeper.connect is overridden to
2019-03-01 03:29:53 INFO JsonKafkaSource:59 - About to read 3482 from Kafka for topic :stock_ticks
2019-03-01 03:29:54 INFO VerifiableProperties:68 - Verifying properties
2019-03-01 03:29:54 INFO VerifiableProperties:68 - Property auto.offset.reset is overridden to smallest
2019-03-01 03:29:54 INFO VerifiableProperties:68 - Property group.id is overridden to
2019-03-01 03:29:54 WARN VerifiableProperties:83 - Property hoodie.bulkinsert.shuffle.parallelism is not valid
2019-03-01 03:29:54 WARN VerifiableProperties:83 - Property hoodie.datasource.write.partitionpath.field is not valid
2019-03-01 03:29:54 WARN VerifiableProperties:83 - Property hoodie.datasource.write.recordkey.field is not valid
2019-03-01 03:29:54 WARN VerifiableProperties:83 - Property hoodie.deltastreamer.schemaprovider.source.schema.file is not valid
2019-03-01 03:29:54 WARN VerifiableProperties:83 - Property hoodie.deltastreamer.schemaprovider.target.schema.file is not valid
2019-03-01 03:29:54 WARN VerifiableProperties:83 - Property hoodie.deltastreamer.source.kafka.topic is not valid
2019-03-01 03:29:54 WARN VerifiableProperties:83 - Property hoodie.insert.shuffle.parallelism is not valid
2019-03-01 03:29:54 WARN VerifiableProperties:83 - Property hoodie.upsert.shuffle.parallelism is not valid
2019-03-01 03:29:54 INFO VerifiableProperties:68 - Property zookeeper.connect is overridden to
Exception in thread "main" java.lang.NullPointerException
at com.uber.hoodie.utilities.deltastreamer.SourceFormatAdapter.fetchNewDataInAvroFormat(SourceFormatAdapter.java:65)
at com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer.sync(HoodieDeltaStreamer.java:229)
at com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer.main(HoodieDeltaStreamer.java:442)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:894)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:198)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:228)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:137)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
2019-03-01 03:29:54 INFO SparkContext:54 - Invoking stop() from shutdown hook
2019-03-01 03:29:54 INFO AbstractConnector:318 - Stopped Spark@7bd69e82{HTTP/1.1,[http/1.1]}{0.0.0.0:4040}
2019-03-01 03:29:54 INFO SparkUI:54 - Stopped Spark web UI at http://adhoc-2:4040
2019-03-01 03:29:54 INFO MapOutputTrackerMasterEndpoint:54 - MapOutputTrackerMasterEndpoint stopped!
2019-03-01 03:29:54 INFO MemoryStore:54 - MemoryStore cleared
2019-03-01 03:29:54 INFO BlockManager:54 - BlockManager stopped
2019-03-01 03:29:54 INFO BlockManagerMaster:54 - BlockManagerMaster stopped
2019-03-01 03:29:54 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint:54 - OutputCommitCoordinator stopped!
2019-03-01 03:29:54 INFO SparkContext:54 - Successfully stopped SparkContext
2019-03-01 03:29:54 INFO ShutdownHookManager:54 - Shutdown hook called
2019-03-01 03:29:54 INFO ShutdownHookManager:54 - Deleting directory /tmp/spark-14221651-b7e8-44de-8d7b-2af4c203c8ff
2019-03-01 03:29:54 INFO ShutdownHookManager:54 - Deleting directory /tmp/spark-0147db3a-6f0e-4c70-929b-5468e09799b5
@rchamarthi A similar issue was pointed out here : https://github.com/uber/hudi/issues/586. Please pass the following argument --schemaprovider-class com.uber.hoodie.utilities.schema.FilebasedSchemaProvider if you are using a schema provided in a file.
Please go through with this change and the complete setup and if you still have questions can answer them.
Thanks @n3nash . That fixed it.
Running the hive sync script is returning the following error
FAILED: SemanticException Cannot find class 'com.uber.hoodie.hadoop.HoodieInputFormat' . Does the hoodie-hadoop-mr need to be included in the classpath or the Hoodie hive uber jar is expected to have all the classes?
at com.uber.hoodie.hive.HoodieHiveClient.updateHiveSQL(HoodieHiveClient.java:459)
at com.uber.hoodie.hive.HoodieHiveClient.createTable(HoodieHiveClient.java:262)
at com.uber.hoodie.hive.HiveSyncTool.syncSchema(HiveSyncTool.java:129)
at com.uber.hoodie.hive.HiveSyncTool.syncHoodieTable(HiveSyncTool.java:96)
at com.uber.hoodie.hive.HiveSyncTool.syncHoodieTable(HiveSyncTool.java:68)
at com.uber.hoodie.hive.HiveSyncTool.main(HiveSyncTool.java:189)
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Cannot find class 'com.uber.hoodie.hadoop.HoodieInputFormat'
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:267)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:253)
at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:313)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:253)
at com.uber.hoodie.org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at com.uber.hoodie.org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at com.uber.hoodie.hive.HoodieHiveClient.updateHiveSQL(HoodieHiveClient.java:457)
... 5 more
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Cannot find class 'com.uber.hoodie.hadoop.HoodieInputFormat'
at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:380)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:206)
at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:290)
at org.apache.hive.service.cli.operation.Operation.run(Operation.java:320)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:530)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:517)
at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:310)
at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:530)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Cannot find class 'com.uber.hoodie.hadoop.HoodieInputFormat'
at org.apache.hadoop.hive.ql.parse.ParseUtils.ensureClassExists(ParseUtils.java:263)
at org.apache.hadoop.hive.ql.parse.StorageFormat.fillStorageFormat(StorageFormat.java:57)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:11887)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:11020)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11133)
at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:286)
at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:512)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1317)
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1295)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:204)
... 15 more
Caused by: java.lang.ClassNotFoundException: com.uber.hoodie.hadoop.HoodieInputFormat
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.hadoop.hive.ql.parse.ParseUtils.ensureClassExists(ParseUtils.java:261)
... 25 more
@rchamarthi : I am unable to reproduce the issue.
The hoodie-hive bundle does include HoodieInputFormat. Inside the adhoc-2 docker container, I ran the "jar tf" command and I am able to see the InputFormat class
jar tf /var/hoodie/ws/packaging/hoodie-hive-bundle/target/hoodie-hive-bundle-0.4.6-SNAPSHOT.jar | grep HoodieInputFormat com/uber/hoodie/hadoop/HoodieInputFormat.class
Can you dump the full logs of the hive-sync command (especially the line that starts with "Running Command : ....")
Hi @bvaradar
This is the output from the old bundle.
bash-4.4# jar -tvf /var/hoodie/ws/packaging/hoodie-hive-bundle/target/hoodie-hive-bundle-0.4.5-SNAPSHOT.jar
0 Thu Feb 28 14:26:02 GMT 2019 META-INF/
134 Thu Feb 28 14:26:02 GMT 2019 META-INF/MANIFEST.MF
0 Thu Feb 28 14:26:02 GMT 2019 com/
0 Thu Feb 28 14:26:02 GMT 2019 com/uber/
0 Thu Feb 28 14:26:02 GMT 2019 com/uber/hoodie/
0 Thu Feb 28 14:26:02 GMT 2019 com/uber/hoodie/hive/
0 Thu Feb 28 14:26:02 GMT 2019 com/uber/hoodie/hive/bundle/
1373 Thu Feb 28 14:26:02 GMT 2019 com/uber/hoodie/hive/bundle/Main.class
0 Thu Feb 28 14:26:02 GMT 2019 META-INF/maven/
0 Thu Feb 28 14:26:02 GMT 2019 META-INF/maven/com.uber.hoodie/
0 Thu Feb 28 14:26:02 GMT 2019 META-INF/maven/com.uber.hoodie/hoodie-hive-bundle/
7298 Tue Feb 19 15:42:34 GMT 2019 META-INF/maven/com.uber.hoodie/hoodie-hive-bundle/pom.xml
134 Thu Feb 28 14:26:02 GMT 2019 META-INF/maven/com.uber.hoodie/hoodie-hive-bundle/pom.properties
I see that you have a new version, so I built the latest version (including the docker containers) and I am trying to run the commands from the beginning. I see a different issue now in the hive initialization step. (I added in the schema-provider class flag this time). Here's the full log.
bash-4.4# spark-submit --class com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer $HUDI_UTILITIES_BUNDLE --storage-type COPY_ON_WRITE --source-class com.uber.hoodie.utilities.sources.JsonKafkaSource --source-ordering-field ts --target-base-path /user/hive/warehouse/stock_ticks_cow --target-table stock_ticks_cow --props /var/demo/config/kafka-source.properties --schemaprovider-class com.uber.hoodie.utilities.schema.FilebasedSchemaProvider
2019-03-01 18:12:59 WARN NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2019-03-01 18:13:00 INFO SparkContext:54 - Running Spark version 2.3.1
2019-03-01 18:13:00 INFO SparkContext:54 - Submitted application: delta-streamer-stock_ticks_cow
2019-03-01 18:13:00 INFO SecurityManager:54 - Changing view acls to: root
2019-03-01 18:13:00 INFO SecurityManager:54 - Changing modify acls to: root
2019-03-01 18:13:00 INFO SecurityManager:54 - Changing view acls groups to:
2019-03-01 18:13:00 INFO SecurityManager:54 - Changing modify acls groups to:
2019-03-01 18:13:00 INFO SecurityManager:54 - SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); groups with view permissions: Set(); users with modify permissions: Set(root); groups with modify permissions: Set()
2019-03-01 18:13:00 INFO Utils:54 - Successfully started service 'sparkDriver' on port 39413.
2019-03-01 18:13:00 INFO SparkEnv:54 - Registering MapOutputTracker
2019-03-01 18:13:00 INFO SparkEnv:54 - Registering BlockManagerMaster
2019-03-01 18:13:00 INFO BlockManagerMasterEndpoint:54 - Using org.apache.spark.storage.DefaultTopologyMapper for getting topology information
2019-03-01 18:13:00 INFO BlockManagerMasterEndpoint:54 - BlockManagerMasterEndpoint up
2019-03-01 18:13:00 INFO DiskBlockManager:54 - Created local directory at /tmp/blockmgr-68f79376-1f00-4980-957b-34797eef1496
2019-03-01 18:13:00 INFO MemoryStore:54 - MemoryStore started with capacity 366.3 MB
2019-03-01 18:13:00 INFO SparkEnv:54 - Registering OutputCommitCoordinator
2019-03-01 18:13:01 INFO log:192 - Logging initialized @3515ms
2019-03-01 18:13:01 INFO Server:346 - jetty-9.3.z-SNAPSHOT
2019-03-01 18:13:01 INFO Server:414 - Started @3685ms
2019-03-01 18:13:01 INFO AbstractConnector:278 - Started ServerConnector@50b8ae8d{HTTP/1.1,[http/1.1]}{0.0.0.0:4040}
2019-03-01 18:13:01 INFO Utils:54 - Successfully started service 'SparkUI' on port 4040.
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@6b85300e{/jobs,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@323e8306{/jobs/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@a23a01d{/jobs/job,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@7561db12{/jobs/job/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@3301500b{/stages,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@24b52d3e{/stages/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@15deb1dc{/stages/stage,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@5af5def9{/stages/stage/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@3a45c42a{/stages/pool,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@36dce7ed{/stages/pool/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@47a64f7d{/storage,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@33d05366{/storage/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@27a0a5a2{/storage/rdd,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@7692cd34{/storage/rdd/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@33aa93c{/environment,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@32c0915e{/environment/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@106faf11{/executors,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@70f43b45{/executors/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@26d10f2e{/executors/threadDump,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@10ad20cb{/executors/threadDump/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@7dd712e8{/static,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@622ef26a{/,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@41de5768{/api,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@e041f0c{/jobs/job/kill,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@6a175569{/stages/stage/kill,null,AVAILABLE,@Spark}
2019-03-01 18:13:01 INFO SparkUI:54 - Bound SparkUI to 0.0.0.0, and started at http://adhoc-2:4040
2019-03-01 18:13:01 INFO deprecation:1173 - mapred.output.compression.codec is deprecated. Instead, use mapreduce.output.fileoutputformat.compress.codec
2019-03-01 18:13:01 INFO deprecation:1173 - mapred.output.compress is deprecated. Instead, use mapreduce.output.fileoutputformat.compress
2019-03-01 18:13:01 INFO deprecation:1173 - mapred.output.compression.type is deprecated. Instead, use mapreduce.output.fileoutputformat.compress.type
2019-03-01 18:13:01 INFO SparkContext:54 - Added JAR file:/var/hoodie/ws/docker/hoodie/hadoop/hive_base/target/hoodie-utilities.jar at spark://adhoc-2:39413/jars/hoodie-utilities.jar with timestamp 1551463981651
2019-03-01 18:13:01 INFO Executor:54 - Starting executor ID driver on host localhost
2019-03-01 18:13:01 INFO Utils:54 - Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 45789.
2019-03-01 18:13:01 INFO NettyBlockTransferService:54 - Server created on adhoc-2:45789
2019-03-01 18:13:01 INFO BlockManager:54 - Using org.apache.spark.storage.RandomBlockReplicationPolicy for block replication policy
2019-03-01 18:13:01 INFO BlockManagerMaster:54 - Registering BlockManager BlockManagerId(driver, adhoc-2, 45789, None)
2019-03-01 18:13:01 INFO BlockManagerMasterEndpoint:54 - Registering block manager adhoc-2:45789 with 366.3 MB RAM, BlockManagerId(driver, adhoc-2, 45789, None)
2019-03-01 18:13:02 INFO BlockManagerMaster:54 - Registered BlockManager BlockManagerId(driver, adhoc-2, 45789, None)
2019-03-01 18:13:02 INFO BlockManager:54 - Initialized BlockManager: BlockManagerId(driver, adhoc-2, 45789, None)
2019-03-01 18:13:02 INFO ContextHandler:781 - Started o.s.j.s.ServletContextHandler@4cbd03e7{/metrics/json,null,AVAILABLE,@Spark}
2019-03-01 18:13:04 INFO FSUtils:89 - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml, __spark_hadoop_conf__.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-3227979_1, ugi=root (auth:SIMPLE)]]]
2019-03-01 18:13:04 WARN SparkContext:66 - Using an existing SparkContext; some configuration may not take effect.
2019-03-01 18:13:04 INFO FSUtils:89 - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml, __spark_hadoop_conf__.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-3227979_1, ugi=root (auth:SIMPLE)]]]
2019-03-01 18:13:05 INFO HoodieDeltaStreamer:165 - Creating delta streamer with configs : {hoodie.datasource.write.partitionpath.field=date, auto.offset.reset=smallest, hoodie.bulkinsert.shuffle.parallelism=2, hoodie.upsert.shuffle.parallelism=2, hoodie.deltastreamer.schemaprovider.target.schema.file=/var/demo/config/schema.avsc, hoodie.datasource.write.recordkey.field=key, hoodie.deltastreamer.schemaprovider.source.schema.file=/var/demo/config/schema.avsc, metadata.broker.list=kafkabroker:9092, hoodie.insert.shuffle.parallelism=2, hoodie.deltastreamer.source.kafka.topic=stock_ticks}
2019-03-01 18:13:05 INFO FSUtils:89 - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml, __spark_hadoop_conf__.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-3227979_1, ugi=root (auth:SIMPLE)]]]
Exception in thread "main" java.io.IOException: Could not load key generator class com.uber.hoodie.SimpleKeyGenerator
at com.uber.hoodie.DataSourceUtils.createKeyGenerator(DataSourceUtils.java:90)
at com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer.<init>(HoodieDeltaStreamer.java:168)
at com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer.<init>(HoodieDeltaStreamer.java:147)
at com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer.main(HoodieDeltaStreamer.java:442)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:894)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:198)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:228)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:137)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: com.uber.hoodie.exception.HoodieException: Unable to instantiate class
at com.uber.hoodie.common.util.ReflectionUtils.loadClass(ReflectionUtils.java:77)
at com.uber.hoodie.common.util.ReflectionUtils.loadClass(ReflectionUtils.java:87)
at com.uber.hoodie.DataSourceUtils.createKeyGenerator(DataSourceUtils.java:88)
... 13 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.uber.hoodie.common.util.ReflectionUtils.loadClass(ReflectionUtils.java:74)
... 15 more
Caused by: java.lang.Error: Unresolved compilation problems:
DataSourceWriteOptions cannot be resolved
DataSourceWriteOptions cannot be resolved
at com.uber.hoodie.SimpleKeyGenerator.<init>(SimpleKeyGenerator.java:40)
... 20 more
2019-03-01 18:13:05 INFO SparkContext:54 - Invoking stop() from shutdown hook
2019-03-01 18:13:05 INFO AbstractConnector:318 - Stopped Spark@50b8ae8d{HTTP/1.1,[http/1.1]}{0.0.0.0:4040}
2019-03-01 18:13:05 INFO SparkUI:54 - Stopped Spark web UI at http://adhoc-2:4040
2019-03-01 18:13:05 INFO MapOutputTrackerMasterEndpoint:54 - MapOutputTrackerMasterEndpoint stopped!
2019-03-01 18:13:05 INFO MemoryStore:54 - MemoryStore cleared
2019-03-01 18:13:05 INFO BlockManager:54 - BlockManager stopped
2019-03-01 18:13:05 INFO BlockManagerMaster:54 - BlockManagerMaster stopped
2019-03-01 18:13:05 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint:54 - OutputCommitCoordinator stopped!
2019-03-01 18:13:05 INFO SparkContext:54 - Successfully stopped SparkContext
2019-03-01 18:13:05 INFO ShutdownHookManager:54 - Shutdown hook called
2019-03-01 18:13:05 INFO ShutdownHookManager:54 - Deleting directory /tmp/spark-aed50cb4-4a04-4647-9f84-c3324e892491
2019-03-01 18:13:05 INFO ShutdownHookManager:54 - Deleting directory /tmp/spark-ed3df84d-40eb-4e07-9d65-cbc1f2c5dd79
Few questions/suggestions ?
Its not clear if you build containers locally (using the script : docker/build_local_docker_images.sh) or pull it from docker-hub (just run ./setup_demo.sh)
When I was trying to reproduce, I was using the existing container from docker-hub. Its been sometime since I tried the path where I build the docker images as it is already in dockerhub.
If you are building docker images, can you delete all hoodie images and just run ./setup_demo.sh ?
Other questions:
The error messages suggests mvn clean install -DskipTests may not have succeeded. Can you please check. I just did the steps I suggested. I am not running into the issues you pointed.
Otherwise, let me know.
Balaji.V
@rchamarthi : Forgot to @ you
Also, I will try the scenario where docker images are locally built and will test when I get a chance.
@bvaradar I actually ran just the ./setup_demo.sh. Let me try force deleting the docker containers and the volumes. I think my current target folder has two different versions and the code is picking up one of them - which happens to be the older jar, here.
https://github.com/uber/hudi/blob/master/hoodie-hive/run_sync_tool.sh#L18
@bvaradar
So, the complete rebuild worked, as expected.
One other error I saw when running the sync script The actual sync was complete, so the rest of the steps worked. Seems like another version/build issue?
Sync complete for stock_ticks_cow
Exception in thread "main" java.lang.NoSuchMethodError:
Exception in thread "main" java.lang.NoSuchMethodError: com.facebook.fb303.FacebookService$Client.sendBaseOneway(Ljava/lang/String;Lorg/apache/thrift/TBase;)
Full Error log
bash-4.4# /var/hoodie/ws/hoodie-hive/run_sync_tool.sh --jdbc-url jdbc:hive2://hiveserver:10000 --user hive --pass hive --partitioned-by dt --base-path /user/hive/warehouse/stock_ticks_cow --database default --table stock_ticks_cow
ls: /opt/hive/lib/hive-jdbc-*standalone*.jar: No such file or directory
Running Command : java -cp /opt/hive/lib/hive-metastore-2.3.3.jar:/opt/hive/lib/hive-service-2.3.3.jar:/opt/hive/lib/hive-exec-2.3.3.jar:/opt/hive/lib/hive-service-2.3.3.jar:/opt/hive/lib/hive-jdbc-2.3.3.jar:/opt/hadoop-2.8.4/share/hadoop/common/*:/opt/hadoop-2.8.4/share/hadoop/mapreduce/*:/opt/hadoop-2.8.4/share/hadoop/hdfs/*:/opt/hadoop-2.8.4/share/hadoop/common/lib/*:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/*:/etc/hadoop:/var/hoodie/ws/hoodie-hive/../packaging/hoodie-hive-bundle/target/hoodie-hive-bundle-0.4.6-SNAPSHOT.jar com.uber.hoodie.hive.HiveSyncTool --jdbc-url jdbc:hive2://hiveserver:10000 --user hive --pass hive --partitioned-by dt --base-path /user/hive/warehouse/stock_ticks_cow --database default --table stock_ticks_cow
2019-03-01 19:06:29,071 WARN [main] util.NativeCodeLoader (NativeCodeLoader.java:<clinit>(62)) - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2019-03-01 19:06:30,189 INFO [main] util.FSUtils (FSUtils.java:getFs(89)) - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-2014267699_1, ugi=root (auth:SIMPLE)]]]
2019-03-01 19:06:30,195 INFO [main] conf.HiveConf (HiveConf.java:findConfigFile(181)) - Found configuration file file:/opt/hadoop-2.8.4/etc/hadoop/hive-site.xml
2019-03-01 19:06:30,505 INFO [main] table.HoodieTableMetaClient (HoodieTableMetaClient.java:<init>(83)) - Loading HoodieTableMetaClient from /user/hive/warehouse/stock_ticks_cow
2019-03-01 19:06:30,509 INFO [main] util.FSUtils (FSUtils.java:getFs(89)) - Hadoop Configuration: fs.defaultFS: [hdfs://namenode:8020], Config:[Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml], FileSystem: [DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-2014267699_1, ugi=root (auth:SIMPLE)]]]
2019-03-01 19:06:30,689 INFO [main] table.HoodieTableConfig (HoodieTableConfig.java:<init>(69)) - Loading dataset properties from /user/hive/warehouse/stock_ticks_cow/.hoodie/hoodie.properties
2019-03-01 19:06:30,855 INFO [main] table.HoodieTableMetaClient (HoodieTableMetaClient.java:<init>(93)) - Finished Loading Table of type COPY_ON_WRITE from /user/hive/warehouse/stock_ticks_cow
2019-03-01 19:06:30,855 INFO [main] table.HoodieTableMetaClient (HoodieTableMetaClient.java:<init>(95)) - Loading Active commit timeline for /user/hive/warehouse/stock_ticks_cow
2019-03-01 19:06:30,912 INFO [main] timeline.HoodieActiveTimeline (HoodieActiveTimeline.java:<init>(75)) - Loaded instants [[20190301190434__clean__COMPLETED], [20190301190434__commit__COMPLETED]]
2019-03-01 19:06:30,914 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:<init>(99)) - Creating hive connection jdbc:hive2://hiveserver:10000
2019-03-01 19:06:30,927 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:createHiveConnection(475)) - Getting Hive Connection from Datasource HiveDataSource{driverClassName='org.apache.hive.jdbc.HiveDriver', driverClassLoader=null, url='jdbc:hive2://hiveserver:10000/default'}
2019-03-01 19:06:30,976 INFO [main] jdbc.Utils (Utils.java:parseURL(325)) - Supplied authorities: hiveserver:10000
2019-03-01 19:06:30,977 INFO [main] jdbc.Utils (Utils.java:parseURL(444)) - Resolved authority: hiveserver:10000
2019-03-01 19:06:31,996 INFO [main] jdbc.Utils (Utils.java:parseURL(325)) - Supplied authorities: hiveserver:10000
2019-03-01 19:06:31,997 INFO [main] jdbc.Utils (Utils.java:parseURL(444)) - Resolved authority: hiveserver:10000
2019-03-01 19:06:32,247 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:createHiveConnection(478)) - Successfully got Hive Connection from Datasource HiveDataSource{driverClassName='org.apache.hive.jdbc.HiveDriver', driverClassLoader=null, url='jdbc:hive2://hiveserver:10000/default'}
2019-03-01 19:06:32,317 INFO [main] hive.metastore (HiveMetaStoreClient.java:open(407)) - Trying to connect to metastore with URI thrift://hivemetastore:9083
2019-03-01 19:06:32,355 INFO [main] hive.metastore (HiveMetaStoreClient.java:open(481)) - Opened a connection to metastore, current connections: 1
2019-03-01 19:06:32,417 INFO [main] hive.metastore (HiveMetaStoreClient.java:open(534)) - Connected to metastore.
2019-03-01 19:06:32,502 INFO [main] hive.HiveSyncTool (HiveSyncTool.java:syncHoodieTable(88)) - Trying to sync hoodie table stock_ticks_cow with base path /user/hive/warehouse/stock_ticks_cow of type COPY_ON_WRITE
2019-03-01 19:06:33,118 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:readSchemaFromDataFile(425)) - Reading schema from /user/hive/warehouse/stock_ticks_cow/2018/08/31/b33eda39-21f7-46b8-931b-3c9cd37bde50_0_20190301190434.parquet
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2019-03-01 19:06:33,391 INFO [main] hive.HiveSyncTool (HiveSyncTool.java:syncSchema(125)) - Table stock_ticks_cow is not found. Creating it
2019-03-01 19:06:33,429 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:createTable(261)) - Creating table with CREATE EXTERNAL TABLE IF NOT EXISTS default.stock_ticks_cow( `_hoodie_commit_time` string, `_hoodie_commit_seqno` string, `_hoodie_record_key` string, `_hoodie_partition_path` string, `_hoodie_file_name` string, `volume` bigint, `ts` string, `symbol` string, `year` int, `month` string, `high` double, `low` double, `key` string, `date` string, `close` double, `open` double, `day` string) PARTITIONED BY (dt String) ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' STORED AS INPUTFORMAT 'com.uber.hoodie.hadoop.HoodieInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat' LOCATION '/user/hive/warehouse/stock_ticks_cow'
2019-03-01 19:06:33,447 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:updateHiveSQL(456)) - Executing SQL CREATE EXTERNAL TABLE IF NOT EXISTS default.stock_ticks_cow( `_hoodie_commit_time` string, `_hoodie_commit_seqno` string, `_hoodie_record_key` string, `_hoodie_partition_path` string, `_hoodie_file_name` string, `volume` bigint, `ts` string, `symbol` string, `year` int, `month` string, `high` double, `low` double, `key` string, `date` string, `close` double, `open` double, `day` string) PARTITIONED BY (dt String) ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' STORED AS INPUTFORMAT 'com.uber.hoodie.hadoop.HoodieInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat' LOCATION '/user/hive/warehouse/stock_ticks_cow'
2019-03-01 19:06:35,678 INFO [main] hive.HiveSyncTool (HiveSyncTool.java:syncHoodieTable(98)) - Schema sync complete. Syncing partitions for stock_ticks_cow
2019-03-01 19:06:35,679 INFO [main] hive.HiveSyncTool (HiveSyncTool.java:syncHoodieTable(104)) - Last commit time synced was found to be null
2019-03-01 19:06:35,679 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:getPartitionsWrittenToSince(553)) - Last commit time synced is not known, listing all partitions in /user/hive/warehouse/stock_ticks_cow,FS :DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-2014267699_1, ugi=root (auth:SIMPLE)]]
2019-03-01 19:06:35,723 INFO [main] hive.HiveSyncTool (HiveSyncTool.java:syncHoodieTable(107)) - Storage partitions scan complete. Found 1
2019-03-01 19:06:35,900 INFO [main] hive.HiveSyncTool (HiveSyncTool.java:syncPartitions(163)) - New Partitions [2018/08/31]
2019-03-01 19:06:35,900 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:addPartitionsToTable(131)) - Adding partitions 1 to table stock_ticks_cow
2019-03-01 19:06:35,900 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:updateHiveSQL(456)) - Executing SQL ALTER TABLE default.stock_ticks_cow ADD IF NOT EXISTS PARTITION (dt='2018-08-31') LOCATION '/user/hive/warehouse/stock_ticks_cow/2018/08/31'
2019-03-01 19:06:36,222 INFO [main] hive.HiveSyncTool (HiveSyncTool.java:syncPartitions(166)) - Changed Partitions []
2019-03-01 19:06:36,222 INFO [main] hive.HoodieHiveClient (HoodieHiveClient.java:updatePartitionsToTable(141)) - No partitions to change for stock_ticks_cow
2019-03-01 19:06:36,445 INFO [main] hive.HiveSyncTool (HiveSyncTool.java:syncHoodieTable(112)) - Sync complete for stock_ticks_cow
Exception in thread "main" java.lang.NoSuchMethodError: com.facebook.fb303.FacebookService$Client.sendBaseOneway(Ljava/lang/String;Lorg/apache/thrift/TBase;)V
at com.facebook.fb303.FacebookService$Client.send_shutdown(FacebookService.java:436)
at com.facebook.fb303.FacebookService$Client.shutdown(FacebookService.java:430)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.close(HiveMetaStoreClient.java:555)
at com.uber.hoodie.hive.HoodieHiveClient.close(HoodieHiveClient.java:543)
at com.uber.hoodie.hive.HiveSyncTool.syncHoodieTable(HiveSyncTool.java:84)
at com.uber.hoodie.hive.HiveSyncTool.main(HiveSyncTool.java:189)
I see you just pushed a commit related to this - https://github.com/uber/hudi/pull/593. Thanks for the fast fix! Does that fix the above issue as well? I'd be glad to run it locally and test to confirm.
@rchamarthi : Yes, I ran into the error as well and have the fix. It would be great if you could pull the PR and rebuild completely and test the demo.
Thanks Balaji.V
@bvaradar I checked out the code in the PR, rebuilt from scratch and ran it. All the demo code works now. 👍 Thank you!