Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
kuixiang committed May 24, 2013
1 parent 3af8f96 commit 4c6ebe4
Show file tree
Hide file tree
Showing 41 changed files with 41 additions and 268 deletions.
35 changes: 19 additions & 16 deletions ...llector-service/src/main/java/com/jd/bdp/hydra/collector/service/CollectorSerService.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void setTopic(String topic) {
this.topic = topic;
}

class HbaseConsumer implements MessageListener{
class HbaseConsumer implements MessageListener {
@Override
public void recieveMessages(Message message) {
persistent(message);
Expand All @@ -52,24 +52,27 @@ public Executor getExecutor() {
}


public void subscribe()throws Exception{
consumer.subscribe(topic,1024*1024,new HbaseConsumer()).completeSubscribe();
public void subscribe() throws Exception {
consumer.subscribe(topic, 1024 * 1024, new HbaseConsumer()).completeSubscribe();
}

public void persistent(Message message){
List<Span> spanList = new ArrayList<Span>();
try{
spanList = (List)PB.parsePBBytes(message.getData());
}catch (Exception e){
log.error(e.getMessage());
public void persistent(Message message) {
List<Span> spanList;
try {
spanList = (List) PB.parsePBBytes(message.getData());
} catch (Exception e) {
log.error(e.getMessage());
return;
}
try{
for(Span s : spanList){
insertService.addSpan(s);
insertService.addAnnotation(s);
insertService.addTrace(s);
}
}catch (Exception e){
try {
if (spanList != null) {
for (Span s : spanList) {
insertService.addSpan(s);
insertService.addAnnotation(s);
insertService.addTrace(s);
}
}
} catch (Exception e) {
e.printStackTrace();
log.error(e.getMessage());
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<context:property-placeholder location="classpath:conf.properties"/>

<bean id="collectorSerService" class="com.jd.bdp.hydra.collector.service.CollectorSerService" >
<bean id="collectorService" class="com.jd.bdp.hydra.collector.service.CollectorSerService" >
<property name="topic" value="${metaq.topic}"></property>
</bean>

Expand Down
10 changes: 10 additions & 0 deletions modules/hydra-store/hydra-hbase/src/test/resources/hbase-site.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<configuration>
<property>
<name>hbase.client.retries.number</name>
<value>3</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>boss,emp1,emp2</value>
</property>
</configuration>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions modules/hydra-web/src/main/resources/hbase-site.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<configuration>
<property>
<name>hbase.client.retries.number</name>
<value>3</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>boss,emp1,emp2</value>
</property>
</configuration>
2 changes: 1 addition & 1 deletion modules/hydra-web/src/main/resources/mysql.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
jdbc.url=jdbc:mysql://192.168.200.113:3306/hydra-config-test
jdbc.url=jdbc:mysql://localhost:3306/hydra-config-test-pressure
jdbc.username=root
jdbc.password=root

0 comments on commit 4c6ebe4

Please sign in to comment.