incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "唐装鼠" <654125...@qq.com>
Subject createOutputStream("mystream").put(event);
Date Tue, 16 Apr 2013 13:46:18 GMT
Hi,I only change the adapterapp in myapp project  produced by s4 itself as below:
remove  "getRemoteStream().put(event);"
add  "createOutputStream("mystream").put(event);"

while deploying s4,I use the command : ./s4 deploy -appClass=hello.HelloInputAdapter  -c=cluster2
-appName=adapter   (ie.remove the "-p=s4.adapter.output.stream=names")

then there comes errors:

[root@202 myApp]# ./s4 deploy -s4r=`pwd`/build/libs/myApp.s4r -c=cluster1 -appName=myApp -zk=202.194.14.172
calling referenced s4 script : /root/apache-s4-0.6.0-incubating-bin/s4
05:35:17.651 [main] INFO  org.apache.s4.tools.Deploy - Using specified S4R [file:/tmp/s4share/myApp/build/libs/myApp.s4r]
[root@202 myApp]# ./s4 newCluster -c=cluster2 -nbTasks=1 -flp=13000
calling referenced s4 script : /root/apache-s4-0.6.0-incubating-bin/s4
05:35:28.133 [main] INFO  org.apache.s4.tools.DefineCluster - preparing new cluster [cluster2]
with [1] node(s)
05:35:28.605 [main] INFO  org.apache.s4.tools.DefineCluster - New cluster configuration uploaded
into zookeeper
[root@202 myApp]# ./s4 deploy -appClass=hello.HelloInputAdapter  -c=cluster2 -appName=adapter
calling referenced s4 script : /root/apache-s4-0.6.0-incubating-bin/s4
05:36:05.075 [main] INFO  org.apache.s4.tools.Deploy - No S4R path specified, nor build file
specified: this assumes the app is in the classpath
[root@202 myApp]# ./s4 adapter -c=cluster2
:cp

BUILD SUCCESSFUL

Total time: 18.314 secs
log4j:WARN No appenders could be found for logger (org.I0Itec.zkclient.ZkEventThread).
log4j:WARN No appenders could be found for logger (org.I0Itec.zkclient.ZkConnection).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN Please initialize the log4j system properly.
05:36:52.010 [main] INFO  o.a.s.comm.topology.AssignmentFromZK - New session:89531874622439437;
state is : SyncConnected
05:36:52.315 [main] INFO  o.a.s.comm.topology.AssignmentFromZK - Successfully acquired task:Task-0
by 202.194.14.172
05:36:52.362 [S4 platform loader] INFO  org.apache.s4.core.S4Bootstrap - Initializing S4 app
with : []]
05:36:52.979 [S4 platform loader] INFO  org.apache.s4.core.S4Bootstrap - Starting S4 app with
application class [hello.HelloInputAdapter]
05:36:53.130 [S4 platform loader] ERROR org.apache.s4.core.S4Bootstrap - Cannot start S4 node
org.apache.s4.deploy.DeploymentFailedException: Cannot start application: cannot instantiate
app class hello.HelloInputAdapter due to: Guice configuration errors:

1) No implementation for java.lang.String annotated with @com.google.inject.name.Named(value=s4.adapter.output.stream)
was bound.
  while locating java.lang.String annotated with @com.google.inject.name.Named(value=s4.adapter.output.stream)
    for field at org.apache.s4.core.adapter.AdapterApp.outputStreamName(AdapterApp.java:35)
  while locating hello.HelloInputAdapter

1 error
    at org.apache.s4.core.S4Bootstrap.loadApp(S4Bootstrap.java:189) [s4-core-0.6.0-incubating.jar:0.6.0-incubating]
    at org.apache.s4.core.S4Bootstrap.startS4App(S4Bootstrap.java:149) [s4-core-0.6.0-incubating.jar:0.6.0-incubating]
    at org.apache.s4.core.S4Bootstrap.access$000(S4Bootstrap.java:80) [s4-core-0.6.0-incubating.jar:0.6.0-incubating]
    at org.apache.s4.core.S4Bootstrap$1.run(S4Bootstrap.java:139) [s4-core-0.6.0-incubating.jar:0.6.0-incubating]
    at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24]
Caused by: com.google.inject.ConfigurationException: Guice configuration errors:

1) No implementation for java.lang.String annotated with @com.google.inject.name.Named(value=s4.adapter.output.stream)
was bound.
  while locating java.lang.String annotated with @com.google.inject.name.Named(value=s4.adapter.output.stream)
    for field at org.apache.s4.core.adapter.AdapterApp.outputStreamName(AdapterApp.java:35)
  while locating hello.HelloInputAdapter

1 error
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004) ~[guice-3.0.jar:na]
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:961) ~[guice-3.0.jar:na]
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013) ~[guice-3.0.jar:na]
    at org.apache.s4.core.S4Bootstrap.loadApp(S4Bootstrap.java:185) [s4-core-0.6.0-incubating.jar:0.6.0-incubating]
    ... 4 common frames omitted



how to solve the errors?
thanks!
Mime
View raw message