小编Ana*_*ari的帖子

Apache Kafka与Apache Storm

Apache Kafka:分布式消息传递系统
Apache Storm:实时消息处理

我们如何在实时数据管道中使用这两种技术来处理事件数据?

就实时数据管道而言,在我看来,两者都是相同的.我们如何在数据管道上使用这两种技术?

data-integration apache-kafka apache-storm

89
推荐指数
5
解决办法
5万
查看次数

为什么启动StreamingContext失败并出现"IllegalArgumentException:要求失败:没有注册输出操作,所以无需执行"?

我正在尝试使用Twitter作为源执行Spark Streaming示例,如下所示:

public static void main (String.. args) {

    SparkConf conf = new SparkConf().setAppName("Spark_Streaming_Twitter").setMaster("local");
        JavaSparkContext sc = new JavaSparkContext(conf);       
        JavaStreamingContext jssc = new JavaStreamingContext(sc, new Duration(2));      
        JavaSQLContext sqlCtx = new JavaSQLContext(sc);     


        String[] filters = new String[] {"soccer"};

        JavaReceiverInputDStream<Status> receiverStream = TwitterUtils.createStream(jssc,filters);



         jssc.start();
         jssc.awaitTermination();

}
Run Code Online (Sandbox Code Playgroud)

但我得到以下例外

Exception in thread "main" java.lang.AssertionError: assertion failed: No output streams registered, so nothing to execute
    at scala.Predef$.assert(Predef.scala:179)
    at org.apache.spark.streaming.DStreamGraph.validate(DStreamGraph.scala:158)
    at org.apache.spark.streaming.StreamingContext.validate(StreamingContext.scala:416)
    at org.apache.spark.streaming.StreamingContext.start(StreamingContext.scala:437)
    at org.apache.spark.streaming.api.java.JavaStreamingContext.start(JavaStreamingContext.scala:501)
    at org.learning.spark.TwitterStreamSpark.main(TwitterStreamSpark.java:53)
Run Code Online (Sandbox Code Playgroud)

有任何建议如何解决这个问题?

java apache-spark spark-streaming

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

无法找到XML架构命名空间的Spring NamespaceHandler [http://cxf.apache.org/jaxrs]

我正在尝试将Apache CXF与Spring集成以创建RESTful Web服务.但是在部署应用程序时,我得到以下异常.

SEVERE: Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxrs]
Offending resource: ServletContext resource [/WEB-INF/beans.xml]
Run Code Online (Sandbox Code Playgroud)

这是我的beans.xml

<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:jaxrs="http://cxf.apache.org/jaxrs"
      xsi:schemaLocation="
         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
         http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">

    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
    <jaxrs:server id="empservice" address="/">
        <jaxrs:serviceBeans>
            <ref bean="empservice"/>
        </jaxrs:serviceBeans>
    </jaxrs:server>

</beans>
Run Code Online (Sandbox Code Playgroud)

我的pom.xml是

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.maventest</groupId>
  <artifactId>Lab</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>Lab Maven Webapp</name>
  <url>http://maven.apache.org</url>
     <properties>
       <javac.version>1.6</javac.version>
        <spring.version>3.0.3.RELEASE</spring.version>
        <junit.version>4.5</junit.version>
        <servlet-api.version>2.5.0</servlet-api.version>
        <cxf.version>2.4.0</cxf.version>
   </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version> …
Run Code Online (Sandbox Code Playgroud)

rest spring tomcat cxf maven

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

无法将名称'repository:repository'解析为(n)'type definition'组件.

我在尝试集成Spring Data时遇到此错误.完整的堆栈跟踪是

nested exception is org.xml.sax.SAXParseException; systemId: http://www.springframework.org/schema/data/jpa/spring-jpa.xsd; lineNumber: 18; columnNumber: 48; src-resolve: Cannot resolve the name 'repository:repository' to a(n) 'type definition' component.
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
Run Code Online (Sandbox Code Playgroud)

XML文件是

<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://www.springframework.org/schema/data/jpa"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/data/jpa
        http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
    <repositories base-package="com.interviewedonline.poc.repositories" />
Run Code Online (Sandbox Code Playgroud)

xml spring spring-data-jpa

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

org.apache.solr.common.SolrException:缺少内容流

我已经用Tomcat安装了Apache Solr,我/solr/admin的工作正常.但是当我尝试发布时, /solr/update我收到以下错误.可能是什么原因?

org.apache.solr.common.SolrException:缺少内容流

solr

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

http自适应流媒体

是否有任何开源流媒体解决方案支持Http Adaptive Streaming?根据我的研究,VLC不支持自适应流媒体.我不确定Darwin Streaming Server.有任何想法吗?

http-streaming libvlc

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

无法在codeigniter中获取帖子表单提交值

我尝试了一个简单的表单提交但是我无法在控制器上使用$this->input->post以及$_POST[]方法获取表单值.我的观点是

<html>
<head>
    <title> Feedback page</title>       
</head>
<body>

    <?php echo form_open('feedback/save'); ?>       
    <p>
        <label>name: </label>
        <?php echo form_input('name'); ?>

    </p>
    <p>
    <label>Email: </label>
        <?php echo form_input('email'); ?>
    </p>
    <p>
    <label>Feedback: </label>
        <?php echo form_textarea('feedback'); ?>
    </p>
    <p>
        <?php echo form_submit('submit','Submit'); ?>
    </p>

    <?php echo form_close(); ?>

</body> 

</html>
Run Code Online (Sandbox Code Playgroud)

和控制器部分是

<?php
class Feedback extends CI_Controller {

function __construct() {
    parent::__construct();      
    $this->load->model("MFeedback");

}
function index() {

    $this->load->view('home/feedback_view.php');
    //print "loaded";


}

function save() {
    print "called";     
    print_r($this->input); 
    $name = …
Run Code Online (Sandbox Code Playgroud)

codeigniter

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

$ this-> db-> insert_id()在mysql codeigniter中不起作用

我只是试图从codeiginitor的mysql表中获取最新的自动生成密钥.但它并没有起作用.我已经尝试过这个代码
$this->db->insert_id()
以及
$this->db->mysql_insert_id()
我得到以下错误 是mysql不支持insert_id函数?我们怎样才能让它发挥作用?
Severity: Notice
Message: Undefined property: CI_DB_mysql_driver::$insert_id

mysql codeigniter

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

jdk7 32位windows版下载

我只是想下载JDK 7,32-bit版本为windows 7.JDKon 的系统要求Oracle说它支持一个32-bit版本,但它没有列在下载页面上.我该如何下载该32-bit版本?

java windows-7 java-7

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

结合python flask和express.js

我有一个Web应用程序,其中站点构建在Python Flask上.现在我们想在页面中引入实时聊天系统.是否可以混合使用flask和express.js,或者只使用express.js开发聊天页面并使用Flask进行休息,或者我们是否有任何类似于python中的express.js的框架可以与烧瓶一起使用?

python node.js flask express

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

模型推荐引擎的隐式和显式行为数据

我跟踪了用户行为数据,1.喜欢2.不喜欢3.评级4.产品浏览5.购买的产品

火花MLlib支持隐含的行为数据,自信得分为0或1,参考(http://spark.apache.org/docs/latest/mllib-collaborative-filtering.html).

例如,用户1查看了产品A,那么模型就像

1,A,1(userId,productId,二进制自信得分)

但通过观察行为的本质,​​所喜欢的产品比产品所看到的更有信心.购买的产品比观看产品有很强的信心.

如何根据行为类型对数据建模?

recommendation-engine collaborative-filtering apache-spark apache-spark-mllib

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

Linux错误路径导出.如何恢复〜./ bashrc文件

当我尝试在~./bashrc我导出的文件上设置java路径,如:

PATH=/usr/local/jdk1.6.0/bin
export PATH
Run Code Online (Sandbox Code Playgroud)

我想这会使所有其他路径都丢失.所以它让我任何像cp这样的核心命令都无法工作.我知道默认~./bashrc文件将在那里/etc/skel.但由于没有任何共同的评论工作,我无法复制它.有什么方法可以恢复原件~./bashrc吗?

bash recover

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

在R中对data.frame进行子集化

我有一个数据框

players    games
-------    ------
roger     tennis
messi     football
agasi     tennis
Run Code Online (Sandbox Code Playgroud)

现在我想获得一个只包含game = tennis的数据框

player    games
roger     tennis
agasi     tennis
Run Code Online (Sandbox Code Playgroud)

如何使用R语言提取仅包含games = tennis的数据框?

r subset dataframe

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