1、使用insert插入字元串報錯
ERROR: AnalysisException: Possible loss of precision for target table 'test.student'.
Expression ''e'' (type: STRING) would need to be cast to VARCHAR(22) for column 'name'
解決辦法:
insert into student values(123, CAST('aaa' AS varchar(22)));
字元串轉換下:CAST('xxx' AS varchar(12))
2、
E0127 19:28:25.289991 13469 impala-server.cc:339] ERROR: short-circuit local reads is disabled because
- Impala cannot read or execute the parent directory of dfs.domain.socket.path
- dfs.client.read.shortcircuit is not enabled.
ERROR: block location tracking is not properly enabled because
- dfs.client.file-block-storage-locations.timeout is too low. It should be at least 3000.
E0127 19:28:25.290117 13469 impala-server.cc:341] Aborting Impala Server startup due to improper configuration
hdfs的配置檔案hdfs-site.xml增加如下内容:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<
property
>
<
name
>dfs.client.read.shortcircuit</
name
>
<
value
>true</
value
>
</
property
>
<
property
>
<
name
>dfs.domain.socket.path</
name
>
<
/var/hdfs-sockets/dn
value>
/var/hdfs-sockets目錄,dn會自動建立
</value> #手動隻需要建立
</
property
>
<
property
>
<
name
>dfs.client.file-block-storage-locations.timeout</
name
>
<
value
>3000</
value
>
</
property
>
<
property
>
<
name
>dfs.datanode.hdfs-blocks-metadata.enabled</
name
>
<
value
>true</
value
>
</
property
>