-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mget options #63
Mget options #63
Conversation
wision
commented
Apr 3, 2014
- default zookeeper options
- checkAndPut
- raw option for mget
- input check for mput
- mput ability to store timestamp
- not fetching region if it's being fetched already
@@ -56,6 +56,12 @@ function Client(options) { | |||
this.out = null; | |||
this.socket = null; | |||
this.logger = options.logger || console; | |||
if (typeof options.zookeeperRoot === "undefined" || options.zookeeperRoot === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.zookeeperRoot = options.zookeeperRoot || '/hbase';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -281,6 +302,11 @@ Client.prototype.processBatch = function (tableName, workingList, useCache, retr | |||
var idx = pair.getFirst(); | |||
var result = pair.getSecond(); | |||
results[idx] = result; | |||
|
|||
if (result.name === 'org.apache.hadoop.hbase.NotServingRegionException') { | |||
delete self.cachedRegionLocations[Bytes.mapKey(regionName.split(',')[0])]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When *RegionException
throw, processBatch
will retry with useCache = false
,
and cachedRegionLocations
will be cleanup.
So no need to delete cache here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My test shows otherwise.
https://gist.github.com/wision/103e570c5386560c816a
I'm inserting 2k rows every second and after couple of seconds I split the table. Without this delete, hbase-client is not able to recover and it stops all the writes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I had been fix this bug on db52e16 after you're using.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will merge this manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.. I'll run the test once you're done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well.. you kept the delete, so it is going to work. I thought you wanted to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, I forgot to delete this... wait for a moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works.. thank you very much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to see you're using this module. You're my first user.
:)
💯
land 71c8bc9 |