[jira] [Created] (HBASE-26032) Make HRegion.getStores() an O(1) operation

2021-06-24 Thread Wei-Chiu Chuang (Jira)
Wei-Chiu Chuang created HBASE-26032:
---

 Summary: Make HRegion.getStores() an O(1) operation
 Key: HBASE-26032
 URL: https://issues.apache.org/jira/browse/HBASE-26032
 Project: HBase
  Issue Type: Improvement
Reporter: Wei-Chiu Chuang
Assignee: Wei-Chiu Chuang
 Attachments: Screen Shot 2021-06-24 at 3.56.33 PM.png

This is a relatively minor issue, but I did spot HRegion.getStores() popping up 
in my profiler.

Checking the code, I realized that HRegion.getStores() allocates a new array 
list in it, converting the Collection<> to List<>. But it also makes it an O( n 
) in space and time complexity.

This conversion appears mostly unnecessary, because we only iterate the stores 
in production code, and so the new ArrayList object is thrown away immediately. 
Only in a number of test code where we index into the stores.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (HBASE-26031) Validate nightly builds run on new ci workers hbase10-hbase15

2021-06-24 Thread Sean Busbey (Jira)
Sean Busbey created HBASE-26031:
---

 Summary: Validate nightly builds run on new ci workers 
hbase10-hbase15
 Key: HBASE-26031
 URL: https://issues.apache.org/jira/browse/HBASE-26031
 Project: HBase
  Issue Type: Task
  Components: test
Reporter: Sean Busbey
Assignee: Sean Busbey


Per slack, asf infra has finished adding in nodes hbase10-hbase15 to ci-hadoop.

make sure they can run nightly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (HBASE-26030) hbase-cleanup.sh did not clean the wal dir if hbase.wal.dir configured individually

2021-06-24 Thread mokai (Jira)
mokai created HBASE-26030:
-

 Summary: hbase-cleanup.sh did not clean the wal dir if 
hbase.wal.dir configured individually
 Key: HBASE-26030
 URL: https://issues.apache.org/jira/browse/HBASE-26030
 Project: HBase
  Issue Type: Bug
  Components: scripts
Affects Versions: 2.2.3
Reporter: mokai


If 'hbase.wal.dir' and 'hbase.rootdir' are configured to different filesystem 
or directories, hbase clean script will clean the directory of 'hbase.rootdir' 
only, the directory of 'hbase.wal.dir'  will be left.

The left direcotries 'WAls,' 'oldWALs', and recovered.edits under region dir 
should be cleaned also.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (HBASE-26012) Improve logging and dequeue logic in DelayQueue

2021-06-24 Thread Viraj Jasani (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-26012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Viraj Jasani resolved HBASE-26012.
--
Fix Version/s: 2.2.8
 Hadoop Flags: Reviewed
   Resolution: Fixed

Thanks for your review [~zhangduo]

> Improve logging and dequeue logic in DelayQueue
> ---
>
> Key: HBASE-26012
> URL: https://issues.apache.org/jira/browse/HBASE-26012
> Project: HBase
>  Issue Type: Improvement
>Affects Versions: 2.3.5, 2.4.4, 3.0.0-alpha-2
>Reporter: Viraj Jasani
>Assignee: Viraj Jasani
>Priority: Minor
> Fix For: 3.0.0-alpha-1, 2.5.0, 2.3.6, 2.2.8, 2.4.5
>
>
> In Remote Procedure dispatcher, before submitting (sub)Procedure to Thread 
> pool, we enqueue it as DelayedWithTimeout object on DelayQueue. 
> TimeoutExecutorThread keeps dequeuing elements from this DelayQueue and 
> submit the Procedure to the threadpool. The expiration of DelayedWithTimeout 
> is determined by getDelay(TimeUnit):
> {code:java}
> @Override
> public long getDelay(final TimeUnit unit) {
>   return DelayedUtil.getRemainingTime(unit, getTimeout());
> }
> {code}
> {code:java}
>   /**
>* @return Time remaining as milliseconds.
>*/
>   public static long getRemainingTime(final TimeUnit resultUnit, final long 
> timeout) {
> final long currentTime = EnvironmentEdgeManager.currentTime();
> if (currentTime >= timeout) {
>   return 0;
> }
> return resultUnit.convert(timeout - currentTime, TimeUnit.MILLISECONDS);
>   }
> {code}
> Hence, in order for the elements to get dequeued on time, it is necessary 
> that EnvironmentEdgeManager.currentTime() returns the current time in millis.
> As part of unit test, if we use our own custom EnvironmentEdge and inject it 
> using EnvironmentEdgeManager.injectEdge before creating any tables, it is 
> possible that we continue returning same value (based on custom impl) with 
> EnvironmentEdgeManager.currentTime(). If that is the case, getRemainingTime 
> as mentioned above, will never return 0 and hence, the procedure wrapped in 
> DelayedWithTimeout might never be dequeued from DelayQueue because it's delay 
> will not expire.
> As of today, our system goes in hanging state while waiting for table regions 
> to be available (as mentioned above, DelayedWithTimeout object never gets 
> dequeued from DelayQueue).
> Thread dump might show something like this consistently:
> {code:java}
> "ProcedureDispatcherTimeoutThread" #319 daemon prio=5 os_prio=31 
> tid=0x7fcaf0cae800 nid=0x21d03 waiting on condition [0x700019293000]
>java.lang.Thread.State: TIMED_WAITING (parking)
>   at sun.misc.Unsafe.park(Native Method)
>   - parking to wait for  <0x0007225a0090> (a 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>   at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
>   at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
>   at java.util.concurrent.DelayQueue.take(DelayQueue.java:223)
>   at 
> org.apache.hadoop.hbase.procedure2.util.DelayedUtil.takeWithoutInterrupt(DelayedUtil.java:82)
>   at 
> org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher$TimeoutExecutorThread.run(RemoteProcedureDispatcher.java:314)
>Locked ownable synchronizers:
>   - None
> {code}
> Although running into situation like this is not likely possible unless 
> custom EnvironmentEdge is used as mentioned above, we should improve our 
> dequeue logic as well as log important message to show where we are stuck.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (HBASE-26013) Get operations readRows metrics becomes zero after HBASE-25677

2021-06-24 Thread Reid Chan (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-26013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Reid Chan resolved HBASE-26013.
---
Hadoop Flags: Reviewed
  Resolution: Fixed

> Get operations readRows metrics becomes zero after HBASE-25677
> --
>
> Key: HBASE-26013
> URL: https://issues.apache.org/jira/browse/HBASE-26013
> Project: HBase
>  Issue Type: Bug
>  Components: metrics
>Reporter: Yutong Xiao
>Assignee: Yutong Xiao
>Priority: Minor
> Fix For: 3.0.0-alpha-1, 2.5.0, 2.3.6, 1.7.1, 2.4.5
>
>
> After HBASE-25677, Server+table counters on each scan are extracted from 
> #nextRaw to rsServices scan. In this case, the get operation will not count 
> the read rows. So that the readRows metrics becomes zero. Should add counter 
> in metricsUpdateForGet.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)