lamber-ken commented on issue #1487: [SUPPORT] Exception in thread "main" 
java.io.IOException: No FileSystem for scheme: hdfs
URL: https://github.com/apache/incubator-hudi/issues/1487#issuecomment-609472838
 
 
   Hi, it works fine in my local env. steps:
   
   1.Add `spark-hive` dependency
   ```
   <dependency>
     <groupId>org.apache.spark</groupId>
     <artifactId>spark-hive_${scala.binary.version}</artifactId>
     <version>2.4.4</version>
     <scope>compile</scope>
   </dependency>
   
   SparkSession spark = SparkSession
       .builder()
       .appName("FeatureExtractor")
       .config("spark.master", "local")
       .config("spark.sql.hive.convertMetastoreParquet", false)
       .config("spark.submit.deployMode", "client")
       .config("spark.jars.packages", "org.apache.spark:spark-avro_2.11:2.4.4")
       .config("spark.sql.warehouse.dir", "/user/hive/warehouse")
       .config("hive.metastore.uris", "thrift://hivemetastore:9083")
       .enableHiveSupport()
       .getOrCreate();
   
   spark.sql("select * from stock_ticks_cow").show(100);
   ```
   
   2.Build fatjar
   ```
   mvn package
   ```
   
   3.Copy to `adhoc-1` docker
   ```
   docker cp test.jar  adhoc-1:/opt/spark
   ```
   
   4.Run test.jar
   ```
   bin/spark-submit \
   --class com.TestExample \
   --executor-memory 1G \
   --total-executor-cores 2 \
   test.jar
   ```
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to