小编Jac*_*iel的帖子

在弹性搜索中为批量加载设置请求超时

我想在Elasticsearch批量上传中将请求时间设置为20秒或更长时间.默认时间设置为10秒,我的警告信息天数设置为10.006秒.并且,在显示警告之后,执行正在抛出错误

现在,我想为每个从用户输入的请求或默认设置的任何值设置请求超时.

错误信息:

    WARNING:elasticsearch:HEAD /opportunityci/predictionsci [status:404 request:0.080s]
validated the index and mapping...!
WARNING:elasticsearch:POST http://192.168.204.154:9200/_bulk [status:N/A request:10.003s]
Traceback (most recent call last):
  File "/Users/adaggula/anaconda/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 94, in perform_request
    response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
  File "/Users/adaggula/anaconda/lib/python2.7/site-packages/urllib3/connectionpool.py", line 640, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/Users/adaggula/anaconda/lib/python2.7/site-packages/urllib3/util/retry.py", line 238, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/Users/adaggula/anaconda/lib/python2.7/site-packages/urllib3/connectionpool.py", line 595, in urlopen
    chunked=chunked)
  File "/Users/adaggula/anaconda/lib/python2.7/site-packages/urllib3/connectionpool.py", line 395, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/Users/adaggula/anaconda/lib/python2.7/site-packages/urllib3/connectionpool.py", line 315, in _raise_timeout
    raise ReadTimeoutError(self, url, "Read timed out. …
Run Code Online (Sandbox Code Playgroud)

python request-timed-out elasticsearch elasticsearch-bulk-api

2
推荐指数
1
解决办法
4948
查看次数

在Neo4j Bolt中的Session.run()VS transaction.run()

Neo4j Bolt驱动程序中的Session.run()和transaction.run()有什么区别?

我的知识是:

Session.run() will execute a single statement    
transaction.run() executes multiple statements.
Run Code Online (Sandbox Code Playgroud)

这些是我所知道的正确信息.所有其他差异是什么?

neo4j neo4j-bolt

2
推荐指数
1
解决办法
2380
查看次数

将字符串封闭列表转换为列表

我试图将引号括起来的列表转换为列表.他们是这样做的最佳方式.

Ex: list = "[1,2,3,4,5]"

Operation : Convert list which is string to a list

o/p: list = [1,2,3,4,5]
Run Code Online (Sandbox Code Playgroud)

python string list

1
推荐指数
1
解决办法
460
查看次数

无法在 Spark 2.x 中加载逻辑回归模型

我正在尝试 Spark 2.x 版本中可用的保存和加载选项。我构建了一个 LogisticRegression 模型并成功保存了模型。但是在加载模型时,面临以下问题

代码片段:

from pyspark.ml.classification import LogisticRegressionModel
LogisticRegressionModel.load("lrmodel")
Run Code Online (Sandbox Code Playgroud)

错误信息:

Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/Volumes/Data/Innominds/spark-2.2.0-bin-hadoop2.7/jars/hadoop-auth-2.7.3.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations …
Run Code Online (Sandbox Code Playgroud)

apache-spark pyspark

1
推荐指数
1
解决办法
1071
查看次数