Database Migration Issues

(A) Spark problem reading data is empty
recent database migration, use Sqoop pumping data to Hive, and then read the data using Spark.
After testing sqoop underlying the use of MapReduce program to import Oracle data into the Hive
So we should use the hive engines read these tables, you need to add code to configure the Spark

hiveContext.setConf("spark.sql.hive.convertMetastoreParquet","false")

(B) Hive library does not have read access
because the production environment hue does not give permission to the database, resulting in meter reading failure

hive> create role asmp;
hive> grant role asmp to user root;
hive> grant select on database db_test to role asmp;
hive> show roles;

(C) test procedure ok, the production process being given
all of our libraries are unified configuration file management, due to special reasons, the code specifies asmp_test a test library, and then packaged by nature is testing performed; then modify the configuration file production library, but this code is not changed back, leading to production execution error! ! ! (Summary reflect ing)

Published 118 original articles · won praise 25 · Views 150,000 +

Guess you like

Origin blog.csdn.net/lhxsir/article/details/103764390