[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-03-03 Thread Yu Li (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15893958#comment-15893958
 ] 

Yu Li commented on HBASE-17361:
---

bq. The BM#flush waits all PUTs to be accomplished...
Yes, this is tracked by HBASE-17368

bq. May be we can use the AP rather than BF in the HTable#put?
Sounds interesting. Actually BM is also using AP (see 
{{BufferedMutatorImpl#backgroundFlushCommits}}), but yes considering 
multi-thread maybe using the batch way is better. Let's move to HBASE-17368 for 
more discussion (smile) [~chia7712]

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
>Priority: Critical
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-03-02 Thread CHIA-PING TSAI (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15893712#comment-15893712
 ] 

CHIA-PING TSAI commented on HBASE-17361:


The BM#flush waits all PUTs to be accomplished. If we share the HTable between 
threads, the HTable#put needs to wait for all PUTs which are created by 
different threads. The logic of BM#flush is good, but the put operation will be 
slow. May be we can use the AP rather than BF in the HTable#put? If yes, it 
will be easier to make HTable thread-safe.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
>Priority: Critical
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-01-19 Thread Yu Li (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15829816#comment-15829816
 ] 

Yu Li commented on HBASE-17361:
---

Attached the TableBuilder implementation in HBASE-17491. [~stack], [~Apache9] 
and [~enis], could you take a look there? Thanks.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
>Priority: Critical
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-01-17 Thread Yu Li (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15826121#comment-15826121
 ] 

Yu Li commented on HBASE-17361:
---

Ok, then let me prepare a patch with the TableBuilder way. Thanks [~Apache9] 
and [~stack] for the suggestion/confirmation.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
>Priority: Critical
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-01-17 Thread stack (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15826114#comment-15826114
 ] 

stack commented on HBASE-17361:
---

bq. Is this acceptable?

IMO, yes. I like this suggestion of deprecating first.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
>Priority: Critical
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-01-17 Thread Duo Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15825775#comment-15825775
 ] 

Duo Zhang commented on HBASE-17361:
---

I suggest that we introduce TableBuilder for both 2.0 and 1.x. We can deprecate 
the setters in 1.x and remove them 2.0. This means in 1.x, HTable is thread 
safe only if you do not call these methods.

Is this acceptable?

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
>Priority: Critical
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-01-17 Thread Yu Li (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15825762#comment-15825762
 ] 

Yu Li commented on HBASE-17361:
---

Thanks for the reminder [~Apache9]

For HTable, I think we still have some interface compatible issue, such as:
1. The {{setWriteBufferSize}} interface which exists from the very beginning
2. The {{setOperationTimeout}} interface has been existing for more than 6 
years (since HBASE-2937)
3. The {{setRpcTimeout}} interface  was introduced by HBASE-15645 which went 
into all 1.0+ branches (1.0.4, 1.1.5, 1.2.2, 1.3.0, 1.4.0)
4. The {{setRead/WriteRpcTimeout}} interfaces were introduced by HBASE-15866 
which also went into branch-1 (1.4.0)

And to make HTable thread safe, we need to move all the above methods into a 
similar table builder like {{AsyncTableBuilder}}, right? I guess the change 
should be only for 2.0 and need to add incompatible flag in release note?

Please let me know your thoughts, and I'll prepare the patch as soon as we get 
a consensus. Thanks.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
>Priority: Critical
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-01-04 Thread Yu Li (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15800396#comment-15800396
 ] 

Yu Li commented on HBASE-17361:
---

Thanks [~enis] for chiming in. Linking HBASE-17372 and this one together for 
consensus.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2017-01-04 Thread Enis Soztutar (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15799345#comment-15799345
 ] 

Enis Soztutar commented on HBASE-17361:
---

I like the idea of having the configuration parameters (timeout, etc) to be 
set-once at construction time. Then we don't have to deal with the user  
changing configs on the fly. Our Connection / Table / BM already is a nice 
abstraction allowing that. If you want different timeout settings, you should 
instantiate a different Table object from Connection. 

The {{ConnectionConfiguration}} class used to be called {{TableConfiguration}}, 
but it was always {{InteraceAudience.Private}}. Maybe we can make a 
TableConfiguration, deprecate / remove all setXXX and have an API like this: 
{code}
TableConfiguration tableConf = connection.getTableConfigs();
tableConf.setRpcTimeout(42);
Table table = connection.getTable(tableName, tableConfigs);
{code}

HBASE-15645 introduced the setXXXTimeout() methods to Table it seems. 

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2016-12-24 Thread Duo Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15774929#comment-15774929
 ] 

Duo Zhang commented on HBASE-17361:
---

If we are going to make the implementation thread safe, then no pool, just one 
{{Table}} instace for each table.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2016-12-24 Thread Jean-Marc Spaggiari (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15774924#comment-15774924
 ] 

Jean-Marc Spaggiari commented on HBASE-17361:
-

So previously the recommendation was to have one single connection (or a 
couple, pooled) and get Table objects from there, one per thread.  Does it 
means it will not be the case anymore in 2.0 and that we can directly pool 
again the table objects?

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2016-12-24 Thread Duo Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15774912#comment-15774912
 ] 

Duo Zhang commented on HBASE-17361:
---

If we are going to keep the table implementation not thread safe then it is not 
a problem to have setXXXTimeout methods which can give user the ability to 
change the timeout before making a call to HBase cluster. And it is not problem 
that we override the default timeout as our best practice is to get a new table 
instance every time.

But here we are trying to make the interface thread safe, then it is a big 
problem. Even if we make the implementation thread safe, a 'set timeout and 
then make a call' is still not thread safe unless the user introduces a lock in 
his/her code...

And IMO, thread-safe or not-thread-safe is not a dead-or-alive choice, so in 
the past I think it is better to keep the old way which gives the user a 
consistent experience. And [~carp84] said he has some numbers which shows that 
a thread safe HTable can give a better performance, then I think we have a good 
reason to change the interface to thread safe.

Thanks.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2016-12-23 Thread stack (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15773541#comment-15773541
 ] 

stack commented on HBASE-17361:
---

Thread-safe in 2.0 is reasonable (Agree that no one reads the javadoc 
[~yangzhe1991])

bq. The problem is the timeout config in Table and AsyncTable. If we allow set 
timeout and then make a call to the HBase cluster, then it is useless to just 
make the calls to HBase cluster thread safe...

Sorry, I don't follow [~Apache9]

When setting timeout per call came up previously -- in review of asynctable -- 
you had a good reason on why it not easy IIRC.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2016-12-23 Thread stack (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15773511#comment-15773511
 ] 

stack commented on HBASE-17361:
---

Yes.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2016-12-23 Thread stack (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15773508#comment-15773508
 ] 

stack commented on HBASE-17361:
---

Oh. Yes. You are right [~Apache9] Thanks for the reminder. Yes, get of BM from 
HTable is not part of our public API. Table is NOT thread-safe. BM is but you 
get these from Connection, not from Table/HTable. Thanks.

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2016-12-23 Thread Yu Li (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15772286#comment-15772286
 ] 

Yu Li commented on HBASE-17361:
---

Indeed a problem, and I think it's more reasonable to set timeout per call 
level rather than table level. Maybe a sub-task to further discuss this?

> Make HTable thread safe
> ---
>
> Key: HBASE-17361
> URL: https://issues.apache.org/jira/browse/HBASE-17361
> Project: HBase
>  Issue Type: Improvement
>Reporter: Yu Li
>Assignee: Yu Li
> Attachments: HBASE-17361.patch, HBASE-17361.patch
>
>
> Currently HTable is marked as NOT thread safe, and this JIRA target at 
> improving this to take better usage of the thread-safe BufferedMutator.
> Some findings/work done:
> If we try to do put to the same HTable instance in parallel, there'll be 
> problem, since now we have {{HTable#getBufferedMutator}} like
> {code}
>BufferedMutator getBufferedMutator() throws IOException {
>  if (mutator == null) {
>   this.mutator = (BufferedMutatorImpl) connection.getBufferedMutator(
>   new BufferedMutatorParams(tableName)
>   .pool(pool)
>   .writeBufferSize(connConfiguration.getWriteBufferSize())
>   .maxKeyValueSize(connConfiguration.getMaxKeyValueSize())
>   );
> }
> mutator.setRpcTimeout(writeRpcTimeout);
> mutator.setOperationTimeout(operationTimeout);
> return mutator;
>   }
> {code}
> And {{HTable#flushCommits}}:
> {code}
>   void flushCommits() throws IOException {
> if (mutator == null) {
>   // nothing to flush if there's no mutator; don't bother creating one.
>   return;
> }
> getBufferedMutator().flush();
>   }
> {code}
> For {{HTable#put}}
> {code}
>   public void put(final Put put) throws IOException {
> getBufferedMutator().mutate(put);
> flushCommits();
>   }
> {code}
> If we launch multiple threads to put in parallel, below sequence might happen 
> because {{HTable#getBufferedMutator}} is not thread safe:
> {noformat}
> 1. ThreadA runs to getBufferedMutator and finds mutator==null
> 2. ThreadB runs to getBufferedMutator and finds mutator==null
> 3. ThreadA initialize mutator to instanceA, then calls mutator#mutate,
> adding one put (putA) into {{writeAsyncBuffer}}
> 4. ThreadB initialize mutator to instanceB
> 5. ThreadA runs to flushCommits, now mutator is instanceB, it calls
> instanceB's flush method, putA is lost
> {noformat}
> After fixing this, we will find quite some contention on 
> {{BufferedMutatorImpl#flush}}, so more efforts required to make HTable thread 
> safe but with good performance meanwhile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17361) Make HTable thread safe

2016-12-22 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15772232#comment-15772232
 ] 

Hadoop QA commented on HBASE-17361:
---

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 14s 
{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green} 0m 
0s {color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 
0s {color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 26s 
{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 3m 
11s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 54s 
{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 
43s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
22s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 
35s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 42s 
{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 11s 
{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 
57s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 51s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 51s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 
43s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
23s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
26m 12s {color} | {color:green} Patch does not cause any errors with Hadoop 
2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 or 3.0.0-alpha1. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 
45s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 42s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 1m 1s 
{color} | {color:green} hbase-client in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 94m 40s 
{color} | {color:green} hbase-server in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 
28s {color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 138m 29s {color} 
| {color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.12.3 Server=1.12.3 Image:yetus/hbase:8d52d23 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12844521/HBASE-17361.patch |
| JIRA Issue | HBASE-17361 |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  hadoopcheck  
hbaseanti  checkstyle  compile  |
| uname | Linux e7fcd2fc9ca4 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 
21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh
 |
| git revision | master / 8fb9a91 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HBASE-Build/5033/testReport/ |
| modules | C: hbase-client hbase-server U: . |
| Console output | 
https://builds.apache.org/job/PreCommit-HBASE-Build/5033/console |
| Powered by | Apache Yetus 0.3.0   http://yetus.apache.org |


This message was automatically generated.



> Make HTable thread safe
> ---
>
>