我複製了所有的Hadoop文件無法在Vertica的
/opt/vertica/packages/hcat/lib
現在,當我運行
./hcatUtil --verifyJars --hcatLibPath=/opt/vertica/packages/hcat
我看到
Summary
-------
Found 27 out of 27 required JARs
Found 5 out of 5 optional Hive SerDe related JARs
Found 2 out of 2 optional native libraries, 5 files in total
Looking at [/opt/vertica/packages/hcat] for configuration files
Found configuration file [cli.xml]
Found configuration file [data-manipulation-statements.xml]
Found configuration file [joins.xml]
Found configuration file [reflect.xml]
Found configuration file [index.xml]
Found configuration file [hdfs-site.xml]
Found configuration file [yarn-site.xml]
Found configuration file [ssl-client.xml]
Found configuration file [core-site.xml]
Found configuration file [project.xml]
Found configuration file [mapred-site.xml]
Found configuration file [var_substitution.xml]
Found configuration file [hive-site.xml]
Found configuration file [working_with_bucketed_tables.xml]
但是當我運行
vsql
\cd /opt/vertica/packages/hcat/ddl
\i install.sql
我得到一個錯誤
sql:install.sql:13: NOTICE 6564: Found Hadoop configuration files in dependency paths. If any of the configuration files is changed, please re-install HCatalog connector library with modified configuration files
CREATE LIBRARY
vsql:install.sql:16: ROLLBACK 3399: Failure in UDx RPC call InvokeSetExecContext(): Error in User Defined Object [VHCatSource], error code: 0
Couldn't instantiate class com.vertica.hcatalogudl.HCatalogSplitsNoOpSourceFactory
vsql:install.sql:17: ROLLBACK 2059: Source with specified name and parameters does not exist: VHCatSource
vsql:install.sql:18: ROLLBACK 3399: Failure in UDx RPC call InvokeSetExecContext(): Error in User Defined Object [VHCatParser], error code: 0
Couldn't instantiate class com.vertica.hcatalogudl.HCatalogSplitsParserFactory
vsql:install.sql:19: ROLLBACK 2059: Parser with specified name and parameters does not exist: VHCatParser
vsql:install.sql:20: ROLLBACK 3472: Function with same name and number of parameters already exists: get_webhcat_host
vertica=>
我用Google搜索,發現這個線程 https://community.dev.hpe.com/t5/Vertica-Forum/hcatalog-connector/td-p/222733
所以我複製/etc/hadoop/conf
目錄的內容從Hadoop的節點之一的所有節點我Vertica集羣。
下一個我做
\i /opt/vertica/packages/hcat/ddl/uninstall.sql
ALTER DATABASE mydb SET JavaClassPathSuffixForUDx='/etc/hadoop-hdfs-conf/';
\i /opt/vertica/packages/hcat/ddl/install.sql
但這並不解決問題。我仍然收到相同的錯誤信息。
編輯::
我沒有對這個問題更重新搜索,我覺得,惠普已經發運了錯誤的Vertica的-hcatalogudl.jar的產品。這就是爲什麼這不適用於其他人。
如果我做
create or replace library public.VHCatalogLib as '/opt/vertica/packages/hcat/lib2/vertica-hcatalogudl.jar' DEPENDS '/opt/vertica/packages/hcat/lib/*.*' language 'java';
我可以看到下面的對象由該libary
SELECT * FROM USER_LIBRARY_MANIFEST WHERE lib_name = 'VHCatalogLib';
schema_name | lib_name | lib_oid | obj_name | obj_type | arg_types | return_type
-------------+--------------+-------------------+--------------------------------------------------+-----------------+-----------+-------------
public | VHCatalogLib | 45035996371219906 | com.vertica.hcatalogudl.WebHCatConfLoaderFactory | Scalar Function | | Varchar
(1 row)
安裝,但是,當我讀到install.sql的源代碼,其自帶的hcatalog連接器。它說
CREATE SOURCE public.VHCatSource as LANGUAGE 'java' name 'com.vertica.hcatalogudl.HCatalogSplitsNoOpSourceFactory' library public.VHCatalogLib;
GRANT EXECUTE ON SOURCE public.VHCatSource() TO PUBLIC;
CREATE PARSER public.VHCatParser as LANGUAGE 'java' name 'com.vertica.hcatalogudl.HCatalogSplitsParserFactory' library public.VHCatalogLib;
GRANT EXECUTE ON PARSER public.VHCatParser() TO PUBLIC;
但圖書館從未安裝
- com.vertica.hcatalogudl.HCatalogSplitsNoOpSourceFactory
- com.vertica.hcatalogudl.HCatalogSplitsParserFactory
這就是爲什麼我們得到一個錯誤
無法實例化類com.vertica.hcatal ogudl.HCatalogSplitsParserFactory
因爲這是因爲他們運送了錯誤的vertica-hcatalogudl.jar文件。
我很確定HP Vertica團隊內部有一個Vertica-hcatalogudl.jar文件,它具有使安裝成功所需的所有3個對象。