Skip to content

Commit

Permalink
- Added missing plugin.xml needed to build the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mallocator committed Mar 13, 2013
1 parent ea295d3 commit 6af5389
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
26 changes: 26 additions & 0 deletions src/main/assemblies/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<assembly>
<id>plugin</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
<exclude>org.elasticsearch:elasticsearch</exclude>
</excludes>
</dependencySet>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
<include>org.hbase:asynchbase</include>
</includes>
</dependencySet>
</dependencySets>
</assembly>
8 changes: 6 additions & 2 deletions src/main/java/org/elasticsearch/river/hbase/HBaseRiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,13 @@ private void parse() throws InterruptedException, Exception {
}
bulkRequest.execute().addListener((ActionListener<BulkResponse>) this);
}

}

/**
* Sets the minimum time stamp on the HBase scanner, by looking into Elasticsearch for the last entry made.
*
* @param scanner
*/
private void setMinTimestamp(final Scanner scanner) {
final SearchResponse response = HBaseRiver.this.esClient.prepareSearch(HBaseRiver.this.index)
.setTypes(HBaseRiver.this.type)
Expand All @@ -209,7 +213,7 @@ private void setMinTimestamp(final Scanner scanner) {
@Override
public void onResponse(final BulkResponse response) {
this.indexCounter += response.items().length;
HBaseRiver.this.logger.info("Indexed {} entries", this.indexCounter);
HBaseRiver.this.logger.info("HBase imported has indexed {} entries so far", this.indexCounter);
if (response.hasFailures()) {
HBaseRiver.this.logger.error("Errors have occured while trying to index new data from HBase");
}
Expand Down

0 comments on commit 6af5389

Please sign in to comment.