小编Pre*_*ist的帖子

主分片未激活或未分配是已知节点?

我在Windows 8上运行弹性搜索版本4.1.我试图通过java索引文档.运行JUNIT测试时,错误如下所示.

org.elasticsearch.action.UnavailableShardsException: [wms][3] Primary shard is not active or isn't assigned is a known node. Timeout: [1m], request: index {[wms][video][AUpdb-bMQ3rfSDgdctGY], source[{
    "fleetNumber": "45",
    "timestamp": "1245657888",
    "geoTag": "73.0012312,-123.00909",
    "videoName": "timestamp.mjpeg",
    "content": "ASD123124NMMM"
}]}
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.retryBecauseUnavailable(TransportShardReplicationOperationAction.java:784)
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.doStart(TransportShardReplicationOperationAction.java:402)
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$3.onTimeout(TransportShardReplicationOperationAction.java:500)
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:239)
    at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:497)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Run Code Online (Sandbox Code Playgroud)

我无法弄清楚,为什么会导致此错误发生.当删除数据或索引工作正常.可能的原因可能是什么.

java indexing sharding elasticsearch

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

SQLite数据库最大存储容量

我有一个关于在SQLite数据库上存储数据的小问题.我们可以最大限度地存储SQLite数据库中的记录数量?有没有限制?如果数据超出此限制,它会给出什么类型的错误?整个系统会失败,还是会发生什么?

database sqlite android

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

使用Apache Shiro进行Restful Web服务身份验证和授权

我可以使用JDBC关系使用apache shiro通过数据库验证基于Web的应用程序.此外,我已经能够使用Shiro-Filters为web.xml中的Shiro过滤器配置和shiro.ini中的配置授予对特定Web资源或http URL的访问权限.

现在,我想为webservices实现相同的功能.特别是,如果凭据有效,我希望用户点击login-url获取令牌.之后,必须根据用户的特定令牌验证对Web服务的所有连续请求.我没有任何线索来实现这一点.任何建议,程序或暗示性链接都可以帮助我!

apache rest web-services shiro

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

在Android中以编程方式启用位置提供程序

是否可以以编程方式打开设备上的LocationProviders(GPS提供商/网络提供商),如果它已关闭?

android location-provider

7
推荐指数
2
解决办法
2万
查看次数

org.apache.spark.sql.catalyst.errors.package$TreeNodeException:执行,树:

我正在尝试注册一个简单的 UDF,用于使用 Scala Luna Eclipse IDE 在 spark 中提取日期功能。这是我的代码:
sqlContext.udf.register("extract", (dateUnit: String, date : String) => udf.extract(dateUnit,date ) )

 def extract(dateUnit : String, date: String) :  String = {
    val splitArray : Array[String] = date.split("-") 
        val result  = dateUnit.toUpperCase() match {
      case "YEAR" => splitArray(0)
      case "MONTH" => splitArray(1)
      case "DAY" => splitArray(2)
      case whoa => "Unexpected case :" + whoa.toString()
    }
    return result ;
  }
Run Code Online (Sandbox Code Playgroud)

当我通过 Eclipse 控制台执行此功能时 Select * from date_dim WHERE d_dom < extract('YEAR', '2015-05-01') limit 10" …

eclipse scala apache-spark apache-spark-sql udf

6
推荐指数
0
解决办法
7843
查看次数

如何在Android中关闭手机发送短信?

我有一个broadCast接收器类可以监听关闭手机,现在我想在手机关机时发送短信.有可能吗?

sms android broadcastreceiver

5
推荐指数
0
解决办法
2602
查看次数

scala with spark - "javax.servlet.ServletRegistration"的签名者信息与同一包中其他类的签名者信息不匹配

我有简单的scala应用程序与spark依赖.我只是尝试使用以下代码创建spark上下文.

 def main(args: Array[String]) {
    var sparkConfig : SparkConf  = new SparkConf() ;
    sparkConfig.setAppName("ProxySQL").setMaster("local");
    var sc = new SparkContext(sparkConfig) 

     }
Run Code Online (Sandbox Code Playgroud)

当我尝试在main中运行此代码时 - 它会在新的SparkContext(sparkConfig)中抛出安全性执行,并显示以下消息.

Exception in thread "main" java.lang.SecurityException: class "javax.servlet.ServletRegistration"'s signer information does not match signer information of other classes in the same package .
Run Code Online (Sandbox Code Playgroud)

在Eclipse的问题选项卡中,它显示一个警告描述路径资源位置类型

More than one scala library found in the build path (D:/workspaces/scala/scalaEclipse/eclipse/plugins/org.scala-ide.scala210.jars_4.0.0.201503031935/target/jars/scala-library.jar, C:/Users/prems.bist/.m2/repository/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar).This is not an optimal configuration, try to limit to one Scala library in the build path.     SQLWrapper  Unknown Scala Classpath Problem
Run Code Online (Sandbox Code Playgroud)

我在windows机器上安装了2.10.4的scala.在eclipse中设置的Scala编译器版本是2.10.5.导致此安全例外的原因是什么?这是不兼容的版本问题还是其他什么?我该如何解决?

sql scala apache-spark

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

更改fuse osgi中的Web服务的默认地址

默认情况下,fuse ESB给出一个以cxf为前导的终点url.例如,如果我有

<jaxws:endpoint id="HTTPEndpoint"
    implementor="org.fusesource.example.PersonImpl"
    address="/PersonServiceCF"/>
Run Code Online (Sandbox Code Playgroud)

在Spring bean中配置的端点,在将其部署为bundle之后,fuse将发布此端点作为 http://localhost:8181/cxf/PersonServiceCF?wsdl

现在我想将默认的前导url cxf更改为其他一些xyz.应该是这样的 http://localhost:8181/xyz/PersonServiceCF?wsdl.我怎么能这样做,我googled很多,但找不到配置文件.任何暗示都非常感激.

cxf fuseesb

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