小编use*_*449的帖子

Solr指数vs存储

我对索引的行为和Solr字段的存储属性有点困惑.

例如,如果我在Schema.xml中有以下内容

<field name="test1" type="text" indexed="false"
        stored="false" required="false" />
Run Code Online (Sandbox Code Playgroud)

即使我在其中创建了包含该字段的文档并将值设置为该字段并将文档提交给Solr ,字段test1也不会存储在Solr文档中.因为我有这个stored=false属性,是否意味着该字段的值在Solr中丢失而不是持久存在?

solr solr4

59
推荐指数
3
解决办法
3万
查看次数

更改Dropwizard默认端口

我在默认端口8080(服务)和8081(管理员)上运行基于Dropwizard的Jersey REST服务,我需要将默认端口更改为不太常用的端口,我无法找到任何信息,请有人指点我这样做吗?

java rest jersey dropwizard

47
推荐指数
4
解决办法
3万
查看次数

设置单个Zookeeper实例并且绑定失败

我正在尝试使用下面的配置设置一个zookeeper实例,但是开始日志表明在尝试绑定端口2181时,zookeeper正在暂停.有人请告诉我这里的问题.谢谢.

启动日志;

    2014-07-18 16:00:48,976 [myid:] - INFO  [main:QuorumPeerConfig@103] - Reading configuration from: /opt/zookeeper/bin/../conf/zoo.cfg
2014-07-18 16:00:48,980 [myid:] - ERROR [main:QuorumPeerConfig@289] - Invalid configuration, only one server specified (ignoring)
2014-07-18 16:00:48,982 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2014-07-18 16:00:48,982 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2014-07-18 16:00:48,983 [myid:] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2014-07-18 16:00:48,983 [myid:] - WARN  [main:QuorumPeerMain@113] - Either no config or no quorum defined in config, running  in standalone …
Run Code Online (Sandbox Code Playgroud)

solrcloud apache-zookeeper

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

Hadoop YARN如何确定容器的数量

我已将Hadoop 2.3部署为单节点集群.由于YARN将资源分配为一个称为容器的单元,我怎么知道在我的单个节点集群中运行了多少个容器(通过查看日志,控制台等)?.

我找不到任何方法来确定,有人可以指导我查看正在使用的数量或容器,并希望从那里获得JVM的总数吗?

提前致谢!

hadoop mapreduce hadoop-yarn

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

SolrJ和自动提交

我正在使用SolrJ API将文档添加到Solr 4.3核心,我注意到我在我使用的stock solrconfig中将自动提交设置为15秒,如下所示.

 <autoCommit>
   <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
   <openSearcher>false</openSearcher>
 </autoCommit>
Run Code Online (Sandbox Code Playgroud)

我的未知之处在于,由于自动提交设置为true,这意味着Solr实例无论如何都会每15秒自动提交一次,因此每次向Solr添加文档时,我都不需要使用SolrJ API进行明确表示,如下所示:我的理解是正确的吗?

        httpSolrServer.add(doc1);
        httpSolrServer.commit();// Is this still needed ?
Run Code Online (Sandbox Code Playgroud)

提前致谢!

solr solrj solrcloud solr4

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

无法启动MongoDB MMS代理

我安装了CentOS的MMS代理,当我作为服务启动时,我在日志文件中看到以下错误,我已经搜索了这个错误,但找不到任何引用可以有人让我知道问题是什么.

/usr/bin/mongodb-mms-monitoring-agent: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)

谢谢.

mongodb-mms

5
推荐指数
2
解决办法
5226
查看次数

如何查看存储在Google云存储桶中的图像?

我有一个存储有图像的存储桶,当我使用图像的公共URL检索图像时,它将在浏览器中下载而不是在浏览器中显示图像,如何查看图像而不是下载图像。我将以下网址用于上传的图片。

https://www.googleapis.com/cn/download/storage/v1/b/image-downloader-bucket/o/a06266f6-6082-468e-92ca-f918a48533a8?generation=1455661996337000&alt=media

有人可以让我知道如何创建用于查看图像的正确URL吗?

google-api google-cloud-storage

5
推荐指数
2
解决办法
6271
查看次数

在Eclipse上使用Dataflow Runner的Apache Beam MinimalWordcount示例

我正在尝试使用来自Eclipse的DataFlowRunner在Windows上使用MinimalWordCount运行MinimalWordCount示例 - >在eclipse中运行为Java应用程序,它使用我的gcs存储桶的示例中的相同股票代码,但是我一直得到以下异常,有人可以告诉我这里的问题吗?

  1. 我已经验证了存储桶名称是否正确.
  2. 我已经在我的Windows机器上运行了gcloud init.

线程"main"中的异常java.lang.RuntimeException:无法在org.apache.beam.sdk.util.InstanceBuilder.buildFromMethod中从工厂方法DataflowRunner#fromOptions(interface org.apache.beam.sdk.options.PipelineOptions)构造实例(InstanceBuilder.java:233)org.apache.beam.sdk.util.InstanceBuilder.build(InstanceBuilder.java:162)org.apache.beam.sdk.runners.PipelineRunner.fromOptions(PipelineRunner.java:56)at at org.apache.beam.sdk.Pipeline.create(Pipeline.java:135)at com.dynaobject.apachebeamexperiment.MinimalWordCount.main(MinimalWordCount.java:77)引起:sun.reflect的java.lang.reflect.InvocationTargetException.位于org.apache的java.lang.reflect.Method.invoke(未知来源)的sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源)的sun.reflect.NativeMethodAccessorImpl.invoke(未知来源)的NativeMethodAccessorImpl.invoke0(本地方法). beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:222)... 4更多引起:java.lang.IllegalA rgumentException:DataflowRunner需要gcpTempLocation,但无法从org.apache.beam.runners.dataflow.DataflowRunner.fromOptions(DataflowRunner.java:212)中的PipelineOptions检索值... 9更多原因:java.lang.IllegalArgumentException:Error构造gcpTempLocation的默认值:tempLocation不是有效的GCS路径,gs:// tempxyz. org.apache.beam.sdk.options.GcpOptions $ GcpTempLocationFactory.create(GcpOptions.java:219)org.apache.beam.sdk.options.GcpOptions $ GcpTempLocationFactory.create(GcpOptions.java:205)at org.apache位于org.apache.beam.sdk.options.ProxyInvocationHandler的org.apache.beam.sdk.options.ProxyInvocationHandler.getDefault(ProxyInvocationHandler.java:516)中的.beam.sdk.options.ProxyInvocationHandler.returnDefaultHelper(ProxyInvocationHandler.java:575) .invoke(ProxyInvocationHandler.java:155)位于com.sun.proxy.$ Proxy15.getGcpTempLocation(未知来源)org.apache.beam.runners.dataflow.DataflowRunner.fromOptions(DataflowRunner.java:210)... 9更多 引发者:java.lang.IllegalArgumentException:输出路径不存在或不可写:gs:// tempxyz at org.apache.beam.sdk.repackaged.com.google.common.base.Preconditions.checkArgument(Preconditions.java) :191)位于org.apache.beam.sdk.util.GcsPathValidator的org.apache.beam.sdk.util.GcsPathValidator.verifyPathIsAccessible(GcsPathValidator.java:78).validateOutputFilePrefixSupported(GcsPathValidator.java:62)at org.apache.beam.sdk.options.GcpOptions $ GcpTempLocationFactory.create(GcpOptions.java:217)... 15更多

java eclipse dataflow google-cloud-dataflow apache-beam

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

BigQuery 表按月分区

我找不到任何与此相关的文档。time_partitioning_type=DAY 是 BigQuery 中对表进行分区的唯一方法吗?除了日期之外,该参数还可以采用其他值吗?

google-bigquery

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

Jersey REST服务可返回jpeg和png图像

我正在尝试使用单个Jersey REST服务,该服务可能返回jpeg类型或png类型的图像,原因是因为该服务只能访问并且正在返回二进制数据,并且无法确定其jpeg图像还是png图像。

如果我使用以下声明,则浏览器将显示二进制数据。

@Produces("image/*")
Run Code Online (Sandbox Code Playgroud)

但是,如果我对jpeg图像使用以下内容,则会显示正确的图像。

@Produces("image/jpeg").
Run Code Online (Sandbox Code Playgroud)

我想知道如何使用一个声明使浏览器识别要渲染的正确图像类型(jpeg或png)?

java rest image jersey

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

DigestUtils md5Hex的问题

我使用org.apache.commons.codec.digest.DigestUtils.md5Hex() Apache-Commons-Codec来计算连接字符串的mD5,但是我得到相同字符串的不同mD5哈希码值.

我看到以下输出,我的期望是它对于给定的字符串是相同的,但看起来不是.问题是什么?

我使用以下代码生成MD5 Hashcode,我在centos平台上.

    if (StringUtils.isNotBlank(concatenatedString)) {

        concatenatedString = StringUtils.deleteWhitespace(concatenatedString);
        //System.out.println("The concatenated string is "+concatenatedString);

        md5Hash = DigestUtils.md5Hex(concatenatedString);
        //System.out.println("The mD5 hashcode is  "+md5Hash);

    }
Run Code Online (Sandbox Code Playgroud)

输出:

The concatenated string is JaclynSmith Women'sComfortDressPumpTori-Blackhttp://www.kmart.com/jaclyn-smith-women-s-comfort-dress-pump-tori-black/p-035VA51352201P//clothing-shoes-jewelry/b-1325032682?sbf=Brand&sbv=Jaclyn+SmithProductDescriptionWhetheryourlookisdressyorcasual,addaclassictouchwiththesewomen'sToripumpsbyJaclynSmith.Theseshoesfeatureshinypatent-lookuppersandwrapped,medium-heightheels.Comfortablecushionedinsolesprovideextrasupportwhiletexturedrubberoutsolesaddanon-slipfit,makingtheseround-toepumpsperfectforeverydayofficewearoraformalnightout.Slip-ondesignSyntheticleatherupperRoundtoeCushionedinsoleTexturedrubberoutsole3-in.wrappedheelCare:WipecleanImportedif(isI18NConvReq()){$("#desca").hide();}24.99http://c.shld.net/rpx/i/s/i/spin/image/spin_prod_1001427212?hei=315&wid=315&op_sharpen=1&resMode=sharp&op_usm=0.9nullKmarthttp://www.kmart.com/jaclyn-smith-women-s-comfort-dress-pump-tori-black/p-035VA51352201P//clothing-shoes-jewelry/b-1325032682?sbf=Brand&sbv=Jaclyn+Smithnullnull
The mD5 hashcode is  f20bd1bbd0063672e89d688268df0556

The concatenated string is JaclynSmith Women'sComfortDressPumpTori-Blackhttp://www.kmart.com/jaclyn-smith-women-s-comfort-dress-pump-tori-black/p-035VA51352201P//clothing-shoes-jewelry/b-1325032682?sbf=Brand&sbv=Jaclyn+SmithProductDescriptionWhetheryourlookisdressyorcasual,addaclassictouchwiththesewomen'sToripumpsbyJaclynSmith.Theseshoesfeatureshinypatent-lookuppersandwrapped,medium-heightheels.Comfortablecushionedinsolesprovideextrasupportwhiletexturedrubberoutsolesaddanon-slipfit,makingtheseround-toepumpsperfectforeverydayofficewearoraformalnightout.Slip-ondesignSyntheticleatherupperRoundtoeCushionedinsoleTexturedrubberoutsole3-in.wrappedheelCare:WipecleanImportedif(isI18NConvReq()){$("#desca").hide();}24.99http://c.shld.net/rpx/i/s/i/spin/image/spin_prod_1001427412?hei=315&wid=315&op_sharpen=1&resMode=sharp&op_usm=0.9nullKmarthttp://www.kmart.com/jaclyn-smith-women-s-comfort-dress-pump-tori-black/p-035VA51352201P//clothing-shoes-jewelry/b-1325032682?sbf=Brand&sbv=Jaclyn+Smithnullnull
The mD5 hashcode is  a0f99dca82fa3b3be846a9896614df9b

The concatenated string is JaclynSmith Women'sComfortDressPumpTori-Blackhttp://www.kmart.com/jaclyn-smith-women-s-comfort-dress-pump-tori-black/p-035VA51352201P//clothing-shoes-jewelry/b-1325032682?sbf=Brand&sbv=Jaclyn+SmithProductDescriptionWhetheryourlookisdressyorcasual,addaclassictouchwiththesewomen'sToripumpsbyJaclynSmith.Theseshoesfeatureshinypatent-lookuppersandwrapped,medium-heightheels.Comfortablecushionedinsolesprovideextrasupportwhiletexturedrubberoutsolesaddanon-slipfit,makingtheseround-toepumpsperfectforeverydayofficewearoraformalnightout.Slip-ondesignSyntheticleatherupperRoundtoeCushionedinsoleTexturedrubberoutsole3-in.wrappedheelCare:WipecleanImportedif(isI18NConvReq()){$("#desca").hide();}24.99http://c.shld.net/rpx/i/s/i/spin/image/spin_prod_1001427112?hei=315&wid=315&op_sharpen=1&resMode=sharp&op_usm=0.9nullKmarthttp://www.kmart.com/jaclyn-smith-women-s-comfort-dress-pump-tori-black/p-035VA51352201P//clothing-shoes-jewelry/b-1325032682?sbf=Brand&sbv=Jaclyn+Smithnullnull
The mD5 hashcode is  b298e7b5af0af3004a078a5c88ab9b09

The concatenated string is JaclynSmith Women'sComfortDressPumpTori-Blackhttp://www.kmart.com/jaclyn-smith-women-s-comfort-dress-pump-tori-black/p-035VA51352201P//clothing-shoes-jewelry/b-1325032682?sbf=Brand&sbv=Jaclyn+SmithProductDescriptionWhetheryourlookisdressyorcasual,addaclassictouchwiththesewomen'sToripumpsbyJaclynSmith.Theseshoesfeatureshinypatent-lookuppersandwrapped,medium-heightheels.Comfortablecushionedinsolesprovideextrasupportwhiletexturedrubberoutsolesaddanon-slipfit,makingtheseround-toepumpsperfectforeverydayofficewearoraformalnightout.Slip-ondesignSyntheticleatherupperRoundtoeCushionedinsoleTexturedrubberoutsole3-in.wrappedheelCare:WipecleanImportedif(isI18NConvReq()){$("#desca").hide();}24.99http://c.shld.net/rpx/i/s/i/spin/image/spin_prod_1001427312?hei=315&wid=315&op_sharpen=1&resMode=sharp&op_usm=0.9nullKmarthttp://www.kmart.com/jaclyn-smith-women-s-comfort-dress-pump-tori-black/p-035VA51352201P//clothing-shoes-jewelry/b-1325032682?sbf=Brand&sbv=Jaclyn+Smithnullnull
The mD5 hashcode is  ffbaf47555d495b818426cc514e24c77
Run Code Online (Sandbox Code Playgroud)

java md5 apache-commons-codec

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

如何使用Stackdriver检查GCE实例的正常运行时间?

我必须检查GCE实例的正常运行时间有哪些选择?

  1. 我是否需要在监视文档中安装监视代理程序,尽管它仅提到有关在GCE实例上安装的Apache服务器的正常运行时间检查的信息,但是如果没有GCE实例本身,则如何检查GCE实例本身是否已启动?网站服务器上吗?

google-compute-engine google-cloud-platform stackdriver google-cloud-monitoring google-cloud-stackdriver

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