-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Moved deletion to after the ElasticSearch operation was done
- Only not failed imported keys are now deleted - Column separator now works better with field normalization - ID field now finds the nested property in mapping
- Loading branch information
1 parent
2ef8ee6
commit 1bca36c
Showing
5 changed files
with
177 additions
and
39 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/org/elasticsearch/river/hbase/HBaseCallbackLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.elasticsearch.river.hbase; | ||
|
||
import org.elasticsearch.common.logging.ESLogger; | ||
|
||
import com.stumbleupon.async.Callback; | ||
|
||
/** | ||
* A small helper class that will log any responses from HBase, in case there are any. | ||
* | ||
* @author Ravi Gairola | ||
*/ | ||
public class HBaseCallbackLogger implements Callback<Object, Object> { | ||
private final ESLogger logger; | ||
private final String realm; | ||
|
||
public HBaseCallbackLogger(final ESLogger logger, final String realm) { | ||
this.logger = logger; | ||
this.realm = realm; | ||
} | ||
|
||
@Override | ||
public Object call(final Object arg) throws Exception { | ||
if (arg instanceof Throwable) { | ||
this.logger.error("An async error has been caught from HBase within {}:", (Throwable) arg, this.realm); | ||
} | ||
else { | ||
this.logger.trace("Got response from HBase within {}: {}", this.realm, arg); | ||
} | ||
return arg; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters