在hive配置远程模式metastore为Oracle,启动正常,创建表时报错
hive> create table dht_tab(name1 int,name45 varchar(50))row format delimited fields terminated by '\t';
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: An exception was thrown while adding/validating class(es) : ORA-01754: a table may contain only one column of type LONG
java.sql.SQLSyntaxErrorException: ORA-01754: a table may contain only one column of type LONG
根据网上修改"hive/lib/hive-metastore-1.2.1.jar"包中package.jdo文件,将LONGVARCHAR类型修改为CLOB,操作如下:
cd $HIVE\_HOME/lib
mkdir temp
cp hive-metastore-1.2.1.jar temp
cd temp
jar -xvf hive-metastore-1.2.1.jar
sed -i -e 's/LONGVARCHAR/CLOB/g' package.jdo
jar cfm hive-metastore-1.2.1.jar META-INF/MANIFEST.MF *
cp hive-metastore-1.2.1.jar $HIVE_HOME/lib
再通过 hive --service metastore 初始化hive 再进入hive创建表仍然报相同错误。
求解????
还有一个问题 就是hive --service hiveserver2 没有反应
感谢!