Details

    Description

      When we try to use HiveIncrementalPuller class to incrementally pull changes from hive, it throws NPE as it is unable to find IncrementalPull.sqltemplate in the bundled jar. 

      Screenshot attached which shows the exception. 

      The jar contains the template. 

      Steps to reproduce - 

      1. copy hive-jdbc-2.3.1.jar, log4j-1.2.17.jar to docker/demo/config folder
      2. run cd docker && ./setup_demo.sh
      3. cat docker/demo/data/batch_1.json | kafkacat -b kafkabroker -t stock_ticks -P
      4.  docker exec -it adhoc-2 /bin/bash
      5.  spark-submit --class org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer $HUDI_UTILITIES_BUNDLE --storage-type COPY_ON_WRITE --source-class org.apache.hudi.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 org.apache.hudi.utilities.schema.FilebasedSchemaProvider
      6.  /var/hoodie/ws/hudi-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
      7. java -cp /var/hoodie/ws/docker/demo/config/hive-jdbc-2.3.1.jar:/var/hoodie/ws/docker/demo/config/log4j-1.2.17.jar:$HUDI_UTILITIES_BUNDLE org.apache.hudi.utilities.HiveIncrementalPuller --hiveUrl jdbc:hive2://hiveserver:10000 --hiveUser hive --hivePass hive --extractSQLFile /var/hoodie/ws/docker/demo/config/incr_pull.txt --sourceDb default --sourceTable stock_ticks_cow --targetDb tmp --targetTable tempTable --fromCommitTime 0 --maxCommits 1

      Attachments

        1. Screenshot 2019-12-30 at 4.43.51 PM.png
          394 kB
          Pratyaksh Sharma

        Issue Links

          Activity

            People

              lamber-ken lamber-ken
              Pratyaksh Pratyaksh Sharma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m