load data inpath出錯原因及解決方法

2021-08-19 15:52:23 字數 828 閱讀 7102

hive> load data inpath "hdfs:" into table person1;                        

failed: semanticexception [error 10028]: line 1:17 path is not legal '"hdfs:"': move from: hdfs: to: hdfs: is not valid. please check that values for params "default.fs.name" and "hive.metastore.warehouse.dir" do not conflict.

通常報這個錯是因為程式會check兩個路徑的schema是否一致,這裡的schema就是namenode名稱,也是namenode的作業系統的機器名,這裡乙個是配置的是ip:192.168.153.202,另外乙個用的是別名,所以報錯。

sqoop先把資料匯入到hdfs某一路徑,這一路徑是有hadoop裡面的core-site.xml裡面的default.fs.name配置決定的,然後再在hive的元資料庫裡面建表,然後用hive的load 檔案到hive的方法把資料匯入到hive,儲存路徑是hive的內部表的路徑,由hive-site.xml的hive.metastore.warehouse.dir決定。

解決方法:1.

修改hive-site.xml檔案:

hive.metastore.warehouse.dir修改為hdfs:

2.不使用別名,配置檔案裡面配的是ip名就寫ip名。

CoordinatorLayout布局出錯

做專案的時候,用 com.android.support design 23.1.1 寫coordinatorlayout的時候 一直都是好好的,但使用fresco 的時候,coordinatorlayout 布局直接報 binary xml file line 9 error inflating ...

this引用逸出

public class unsafeclass 如上述 所示,在建構函式中定義新的執行緒或者發布會導致this引用逸出,此時的問題就在於建構函式還沒有構造完成.public class safeclass public safeclass newinstance button button 發布t...

出棧序列統計

問題描述 棧是常用的一種資料結構,有 n令元素在棧頂端一側等待進棧,棧頂端另一側是出棧序列。你已經知道棧的操作有兩 種 push 和pop 前者是將乙個元素進棧,後者是將棧頂元素彈出。現在要使用這兩種操作,由乙個操作序列可以得到一系列的輸出序列。請你程式設計求出對於給定的 n,計算並輸出由運算元序列...