gpt4 book ai didi

apache-spark - 无法检测到ES版本-通常在无法访问网络/Elasticsearch群集(HIVE)时发生

转载 作者:可可西里 更新时间:2023-11-01 15:19:31 24 4
gpt4 key购买 nike

我目前正在尝试仅执行从Hive到ElasticSearch的“SELECT * FROM table”。我正在使用cloudera CDH 6.0.1。我已经在我的配置单元路径中添加了elasticsearch-hadoop-hive-7.1.1 jar。我有ElasticSearch 7.1.1 cloudera堆栈和Elastic运行在派生服务器中,但在同一网络中。

CREATE EXTERNAL TABLE ctrl_rater_resumen_lla_es  
(
fecha_registro string,
direccion string,
linea_b_codigo_prestadora string,
linea_b_tipo_numero string,
es_roaming string,
call_duration string,
linea_b_routing_number string,
minutos string, fecha string
)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES (
'es.resource' = 'ctrl_rater_resumen_lla/hb',
'es.node' = 'http://10.129.x.xxx',
'es.port' = '9200',
'es.index.auto.create' = 'true',
'es.index.read.missing.as.empty' = 'true',
'es.nodes.discovery'='true',
'es.net.ssl'='false'
'es.nodes.client.only'='false',
'es.nodes.wan.only' = 'true'
'es.net.http.auth.user'='xxxxx',
'es.net.http.auth.pass' = 'xxxxx'
);

创建成功
SELECT * FROM ctrl_rater_resumen_lla_es;


请求的错误状态TFetchResultsReq(fetchType = 0,operationHandle = TOperationHandle(hasResultSet = True,ModifyRowCount = None,operationType = 0,operationId = THandleIdentifier(secret ='\ xbaYG * \ xd4wI \ xc0 \ xb8 \ xf6 \ x94Q \ xa3 \ xa4 ',guid ='\ xff \ xca \ xdb \ xb5 \ x040E \ x0e \ x8eE \ xe4 \ xf7?t \ x1b \ x01')),方向= 4,maxRows = 100):TFetchResultsResp(status = TStatus(errorCode = 0,errorMessage =“java.io.IOException:org.elasticsearch.hadoop.EsHadoopIllegalArgumentException:无法检测到ES版本-通常,如果无法访问网络/ Elasticsearch集群,或者在没有正确设置'es的情况下定位WAN / Cloud实例时,会发生这种情况.nodes.wan.only'“,sqlState = None,infoMessages = [” * org.apache.hive.service.cli.HiveSQLException:java.io.IOException:org.elasticsearch.hadoop.EsHadoopIllegalArgumentException:无法检测到ES版本-通常如果无法访问网络/ Elasticsearch群集,或者在没有正确设置“es.nodes.wan.only”的情况下定位WAN / Cloud实例时,会发生这种情况:25:24 ”,“org.apache.hive.service.cli.operation.SQLOperation:getNextRowSet:SQLOperation.java:492”,“org.apache.hive.service.cli.operation.OperationManager:getOperationNextRowSet:OperationManager.java:297”, 'org.apache.hive.service.cli.session.HiveSessionImpl:fetchResults:HiveSessionImpl.java:852','sun.reflect.GeneratedMethodAccessor24:invoke::-1','sun.reflect.DelegatingMethodAccessorImpl:invoke:DelegatingMethodAccessorImpl.java :43','java.lang.reflect.Method:invoke:Method.java:498','org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:78','org.apache .hive.service.cli.session.HiveSessionProxy:access $ 000:HiveSessionProxy.java:36','org.apache.hive.service.cli.session.HiveSessionProxy $ 1:run:HiveSessionProxy.java:63','java.security .AccessController:doPrivileged:AccessController.java:-2','javax.security.auth.Subject:doAs:Subject.java:422','org.apache.hadoop.security.UserGroupInformation:doAs:UserGroupInformation.java:1726' ,'org.apache.hive.service.cli.session。 HiveSessionProxy:invoke:HiveSessionProxy.java:59','com.sun.proxy。$ Proxy38:fetchResults::-1','org.apache.hive.service.cli.CLIService:fetchResults:CLIService.java:505', 'org.apache.hive.service.cli.thrift.ThriftCLIService:FetchResults:ThriftCLIService.java:702','org.apache.hive.service.rpc.thrift.TCLIService $ Processor $ FetchResults:getResult:TCLIService.java:1717 ','org.apache.hive.service.rpc.thrift.TCLIService $ Processor $ FetchResults:getResult:TCLIService.java:1702','org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39','org .apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39','org.apache.hive.service.auth.TSetIpAddressProcessor:process:TSetIpAddressProcessor.java:56','org.apache.thrift.server.TThreadPoolServer $ WorkerProcess :run:TThreadPoolServer.java:286','java.util.concurrent.ThreadPoolExecutor:runWorker:ThreadPoolExecutor.java:1149','java.util.concurrent.ThreadPoolExecutor $ Worker:run:ThreadPoolExecutor.java:624','java .lang.Thread:run:Thread.java:748',“* java.io.IOException:org.elasticsearch.hadoop.EsHadoopIllegalArgumentException:无法检测到ES版本-通常,如果无法访问网络/ Elasticsearch集群,或者在没有正确设置'es.nodes.wan的情况下定位WAN / Cloud实例时,会发生这种情况。仅':29:4“,'org.apache.hadoop.hive.ql.exec.FetchOperator:getNextRow:FetchOperator.java:521','org.apache.hadoop.hive.ql.exec.FetchOperator:pushRow:FetchOperator .java:428','org.apache.hadoop.hive.ql.exec.FetchTask:fetch:FetchTask.java:146','org.apache.hadoop.hive.ql.Driver:getResults:Driver.java:2196 ','org.apache.hive.service.cli.operation.SQLOperation:getNextRowSet:SQLOperation.java:487',“* org.elasticsearch.hadoop.EsHadoopIllegalArgumentException:无法检测到ES版本-通常,如果网络/ Elasticsearch群集会发生这种情况如果没有正确设置'es.nodes.wan.only':35:6“,'org.elasticsearch.hadoop.rest.InitializationUtils:discoverClusterInfo:Initializa,则无法访问或定位WAN /云实例tionUtils.java:340','org.elasticsearch.hadoop.hive.HiveUtils:init:HiveUtils.java:197','org.elasticsearch.hadoop.hive.EsHiveInputFormat:getSplits:EsHiveInputFormat.java:112','org。 elasticsearch.hadoop.hive.EsHiveInputFormat:getSplits:EsHiveInputFormat.java:51','org.apache.hadoop.hive.ql.exec.FetchOperator:getNextSplits:FetchOperator.java:372','org.apache.hadoop.hive。 ql.exec.FetchOperator:getRecordReader:FetchOperator.java:304','org.apache.hadoop.hive.ql.exec.FetchOperator:getNextRow:FetchOperator.java:459','* org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException :连接错误(检查网络和/或代理设置)-所有节点均失败;已尝试[[localhost:9200]]:41:6','org.elasticsearch.hadoop.rest.NetworkClient:execute:NetworkClient.java:152','org.elasticsearch.hadoop.rest.RestClient:execute:RestClient.java :424','org.elasticsearch.hadoop.rest.RestClient:execute:RestClient.java:388','org.elasticsearch.hadoop.rest.RestClient:execute:RestClient.java:392','org.elasticsearch.hadoop .rest.RestClient:get:RestClient.java:168','org.elasticsearch.hadoop.rest.RestClient:mainInfo:RestClient.java:735','org.elasticsearch.hadoop.rest.InitializationUtils:discoverClusterInfo:InitializationUtils.java :330'],statusCode = 3),结果=无,hasMoreRows =无)

最佳答案

正确的属性是“es.node s ”,而不是“es.node”。默认值为“localhost”,因此您尝试连接到本地主机而不是要连接到的节点。有关更多信息,请参见the documentation

如果您未连接到cloude环境,则可能还需要考虑是否需要将属性“es.nodes.wan.only”设置为true,因为这将禁用自动发现网络中其他节点的功能。在the documentation中进行了解释(您需要向下滚动一点)。它将强制系统使用“es.nodes”属性,该属性默认情况下会尝试连接到本地主机。这就是为什么您会收到该错误,但是即使您将其设置为有效,该设置也会对您的性能产​​生影响(最初的重点):

Note that in this mode, performance is highly affected.

关于apache-spark - 无法检测到ES版本-通常在无法访问网络/Elasticsearch群集(HIVE)时发生,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57154092/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com