You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Irfan Mohammed (JIRA)" <ji...@apache.org> on 2009/06/15 21:21:07 UTC
[jira] Created: (HBASE-1525) HTable.incrementColumnValue hangs()
HTable.incrementColumnValue hangs()
------------------------------------
Key: HBASE-1525
URL: https://issues.apache.org/jira/browse/HBASE-1525
Project: Hadoop HBase
Issue Type: Bug
Components: regionserver
Affects Versions: 0.20.0
Environment: ubuntu 9.04
jdk 1.6.0.13
hadoop 0.20.0
hbase 0.20.0-dev [trunk]
Reporter: Irfan Mohammed
In the following code,
@Test
public void usingIncrement() throws Exception
{
long siteId = 1234;
long publisherId = 5678;
Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
long[] metrics = new long[] { 10, 22, 32 };
byte[] rowKey = Bytes.toBytes(siteId + "_" + ROW_KEY_FORMAT.format(eventTime));
byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
byte[] qualifier = Bytes.toBytes(publisherId);
HTable table = getTable();
for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
LOGGER.info("processing [{0}] ...", i1);
table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
LOGGER.info("processing [{0}] completed", i1);
}
table.close();
queryMetrics(table, siteId, publisherId, eventTime);
}
The call table.incrementColumnValue hangs. Have to kill the hbase client and the master processes to get around the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-1525) HTable.incrementColumnValue hangs()
Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719733#action_12719733 ]
Evgeny Ryabitskiy commented on HBASE-1525:
------------------------------------------
ah.. yeah... good find!
> HTable.incrementColumnValue hangs()
> ------------------------------------
>
> Key: HBASE-1525
> URL: https://issues.apache.org/jira/browse/HBASE-1525
> Project: Hadoop HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.20.0
> Environment: ubuntu 9.04
> jdk 1.6.0.13
> hadoop 0.20.0
> hbase 0.20.0-dev [trunk]
> Reporter: Irfan Mohammed
> Attachments: 1525.patch, client_dump.out, hbase-irfan-master-damascus.out
>
>
> In the following code,
> @Test
> public void usingIncrement() throws Exception
> {
> long siteId = 1234;
> long publisherId = 5678;
> Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
>
> long[] metrics = new long[] { 10, 22, 32 };
>
> byte[] rowKey = Bytes.toBytes(siteId + "_" + ROW_KEY_FORMAT.format(eventTime));
> byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
> byte[] qualifier = Bytes.toBytes(publisherId);
>
> HTable table = getTable();
>
> for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
> LOGGER.info("processing [{0}] ...", i1);
> table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
> LOGGER.info("processing [{0}] completed", i1);
> }
>
> table.close();
> queryMetrics(table, siteId, publisherId, eventTime);
> }
> The call table.incrementColumnValue hangs. Have to kill the hbase client and the master processes to get around the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-1525) HTable.incrementColumnValue hangs()
Posted by "Irfan Mohammed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Irfan Mohammed updated HBASE-1525:
----------------------------------
Attachment: 1525.patch
check for the non-null in the finally block before releasing the row lock.
> HTable.incrementColumnValue hangs()
> ------------------------------------
>
> Key: HBASE-1525
> URL: https://issues.apache.org/jira/browse/HBASE-1525
> Project: Hadoop HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.20.0
> Environment: ubuntu 9.04
> jdk 1.6.0.13
> hadoop 0.20.0
> hbase 0.20.0-dev [trunk]
> Reporter: Irfan Mohammed
> Attachments: 1525.patch, client_dump.out, hbase-irfan-master-damascus.out
>
>
> In the following code,
> @Test
> public void usingIncrement() throws Exception
> {
> long siteId = 1234;
> long publisherId = 5678;
> Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
>
> long[] metrics = new long[] { 10, 22, 32 };
>
> byte[] rowKey = Bytes.toBytes(siteId + "_" + ROW_KEY_FORMAT.format(eventTime));
> byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
> byte[] qualifier = Bytes.toBytes(publisherId);
>
> HTable table = getTable();
>
> for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
> LOGGER.info("processing [{0}] ...", i1);
> table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
> LOGGER.info("processing [{0}] completed", i1);
> }
>
> table.close();
> queryMetrics(table, siteId, publisherId, eventTime);
> }
> The call table.incrementColumnValue hangs. Have to kill the hbase client and the master processes to get around the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-1525) HTable.incrementColumnValue hangs()
Posted by "ryan rawson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ryan rawson updated HBASE-1525:
-------------------------------
Resolution: Fixed
Fix Version/s: 0.20.0
Status: Resolved (was: Patch Available)
thanks for the bug report!
> HTable.incrementColumnValue hangs()
> ------------------------------------
>
> Key: HBASE-1525
> URL: https://issues.apache.org/jira/browse/HBASE-1525
> Project: Hadoop HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.20.0
> Environment: ubuntu 9.04
> jdk 1.6.0.13
> hadoop 0.20.0
> hbase 0.20.0-dev [trunk]
> Reporter: Irfan Mohammed
> Fix For: 0.20.0
>
> Attachments: 1525.patch, client_dump.out, HBASE-1525-v2.patch, hbase-irfan-master-damascus.out
>
>
> In the following code,
> @Test
> public void usingIncrement() throws Exception
> {
> long siteId = 1234;
> long publisherId = 5678;
> Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
>
> long[] metrics = new long[] { 10, 22, 32 };
>
> byte[] rowKey = Bytes.toBytes(siteId + "_" + ROW_KEY_FORMAT.format(eventTime));
> byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
> byte[] qualifier = Bytes.toBytes(publisherId);
>
> HTable table = getTable();
>
> for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
> LOGGER.info("processing [{0}] ...", i1);
> table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
> LOGGER.info("processing [{0}] completed", i1);
> }
>
> table.close();
> queryMetrics(table, siteId, publisherId, eventTime);
> }
> The call table.incrementColumnValue hangs. Have to kill the hbase client and the master processes to get around the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-1525) HTable.incrementColumnValue hangs()
Posted by "Irfan Mohammed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Irfan Mohammed updated HBASE-1525:
----------------------------------
Status: Patch Available (was: Open)
Check for the non-null condition in the finally block when releasing the rowLock.
> HTable.incrementColumnValue hangs()
> ------------------------------------
>
> Key: HBASE-1525
> URL: https://issues.apache.org/jira/browse/HBASE-1525
> Project: Hadoop HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.20.0
> Environment: ubuntu 9.04
> jdk 1.6.0.13
> hadoop 0.20.0
> hbase 0.20.0-dev [trunk]
> Reporter: Irfan Mohammed
> Attachments: client_dump.out, hbase-irfan-master-damascus.out
>
>
> In the following code,
> @Test
> public void usingIncrement() throws Exception
> {
> long siteId = 1234;
> long publisherId = 5678;
> Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
>
> long[] metrics = new long[] { 10, 22, 32 };
>
> byte[] rowKey = Bytes.toBytes(siteId + "_" + ROW_KEY_FORMAT.format(eventTime));
> byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
> byte[] qualifier = Bytes.toBytes(publisherId);
>
> HTable table = getTable();
>
> for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
> LOGGER.info("processing [{0}] ...", i1);
> table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
> LOGGER.info("processing [{0}] completed", i1);
> }
>
> table.close();
> queryMetrics(table, siteId, publisherId, eventTime);
> }
> The call table.incrementColumnValue hangs. Have to kill the hbase client and the master processes to get around the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-1525) HTable.incrementColumnValue hangs()
Posted by "Irfan Mohammed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Irfan Mohammed updated HBASE-1525:
----------------------------------
Attachment: client_dump.out
hbase-irfan-master-damascus.out
Attached the client and the master thread dumps.
> HTable.incrementColumnValue hangs()
> ------------------------------------
>
> Key: HBASE-1525
> URL: https://issues.apache.org/jira/browse/HBASE-1525
> Project: Hadoop HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.20.0
> Environment: ubuntu 9.04
> jdk 1.6.0.13
> hadoop 0.20.0
> hbase 0.20.0-dev [trunk]
> Reporter: Irfan Mohammed
> Attachments: client_dump.out, hbase-irfan-master-damascus.out
>
>
> In the following code,
> @Test
> public void usingIncrement() throws Exception
> {
> long siteId = 1234;
> long publisherId = 5678;
> Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
>
> long[] metrics = new long[] { 10, 22, 32 };
>
> byte[] rowKey = Bytes.toBytes(siteId + "_" + ROW_KEY_FORMAT.format(eventTime));
> byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
> byte[] qualifier = Bytes.toBytes(publisherId);
>
> HTable table = getTable();
>
> for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
> LOGGER.info("processing [{0}] ...", i1);
> table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
> LOGGER.info("processing [{0}] completed", i1);
> }
>
> table.close();
> queryMetrics(table, siteId, publisherId, eventTime);
> }
> The call table.incrementColumnValue hangs. Have to kill the hbase client and the master processes to get around the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-1525) HTable.incrementColumnValue hangs()
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719747#action_12719747 ]
stack commented on HBASE-1525:
------------------------------
+1 on patch
> HTable.incrementColumnValue hangs()
> ------------------------------------
>
> Key: HBASE-1525
> URL: https://issues.apache.org/jira/browse/HBASE-1525
> Project: Hadoop HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.20.0
> Environment: ubuntu 9.04
> jdk 1.6.0.13
> hadoop 0.20.0
> hbase 0.20.0-dev [trunk]
> Reporter: Irfan Mohammed
> Attachments: 1525.patch, client_dump.out, HBASE-1525-v2.patch, hbase-irfan-master-damascus.out
>
>
> In the following code,
> @Test
> public void usingIncrement() throws Exception
> {
> long siteId = 1234;
> long publisherId = 5678;
> Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
>
> long[] metrics = new long[] { 10, 22, 32 };
>
> byte[] rowKey = Bytes.toBytes(siteId + "_" + ROW_KEY_FORMAT.format(eventTime));
> byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
> byte[] qualifier = Bytes.toBytes(publisherId);
>
> HTable table = getTable();
>
> for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
> LOGGER.info("processing [{0}] ...", i1);
> table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
> LOGGER.info("processing [{0}] completed", i1);
> }
>
> table.close();
> queryMetrics(table, siteId, publisherId, eventTime);
> }
> The call table.incrementColumnValue hangs. Have to kill the hbase client and the master processes to get around the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-1525) HTable.incrementColumnValue hangs()
Posted by "ryan rawson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ryan rawson updated HBASE-1525:
-------------------------------
Attachment: HBASE-1525-v2.patch
Looks like the row lock is being acquired and never released. Refactoring lossage probably.
Here is a slightly revised patch (use -p1) to always release the row lock. There is some confusion because most of the other functions are like so:
public void doSomething(..., Integer lockid) {
// stuff
} finally {
if (lockid == null)
releaseLock(lid);
}
}
this looks weird, but what is really happening is we are unlocking the rowlock if we are _not_ passed a row lock (lockid == null), otherwise we leave the row locked and trust our caller to unlock it.
> HTable.incrementColumnValue hangs()
> ------------------------------------
>
> Key: HBASE-1525
> URL: https://issues.apache.org/jira/browse/HBASE-1525
> Project: Hadoop HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.20.0
> Environment: ubuntu 9.04
> jdk 1.6.0.13
> hadoop 0.20.0
> hbase 0.20.0-dev [trunk]
> Reporter: Irfan Mohammed
> Attachments: 1525.patch, client_dump.out, HBASE-1525-v2.patch, hbase-irfan-master-damascus.out
>
>
> In the following code,
> @Test
> public void usingIncrement() throws Exception
> {
> long siteId = 1234;
> long publisherId = 5678;
> Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
>
> long[] metrics = new long[] { 10, 22, 32 };
>
> byte[] rowKey = Bytes.toBytes(siteId + "_" + ROW_KEY_FORMAT.format(eventTime));
> byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
> byte[] qualifier = Bytes.toBytes(publisherId);
>
> HTable table = getTable();
>
> for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
> LOGGER.info("processing [{0}] ...", i1);
> table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
> LOGGER.info("processing [{0}] completed", i1);
> }
>
> table.close();
> queryMetrics(table, siteId, publisherId, eventTime);
> }
> The call table.incrementColumnValue hangs. Have to kill the hbase client and the master processes to get around the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.