Discussion:
[jira] [Created] (HBASE-21392) HTable can also write data after calling the close method.
lixiaobao (JIRA)
2018-10-26 07:23:00 UTC
Permalink
lixiaobao created HBASE-21392:
---------------------------------

Summary: HTable can also write data after calling the close method.
Key: HBASE-21392
URL: https://issues.apache.org/jira/browse/HBASE-21392
Project: HBase
Issue Type: Improvement
Components: Client
Environment: HBase 1.2.0
Reporter: lixiaobao


HTable can also write data after calling the close method.

val conn = ConnectionFactory.createConnection(conf)

val codoPut = new Put(rowKey4.getBytes())
codoPut.addColumn("cf".getBytes(), columnField.getBytes(), endTimeLong, Bytes.toBytes(line.getLong(8)))
codo.put(codoPut)
codo.close()

 

val codoPut = new Put(rowKey4.getBytes())
codoPut.addColumn("cf".getBytes(), columnField.getBytes(), endTimeLong, Bytes.toBytes(line.getLong(8)))

codo.put(codoPut)

after call close method ,can alse write data into HBase.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
lixiaobao (JIRA)
2018-11-28 06:22:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/HBASE-21392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

lixiaobao resolved HBASE-21392.
-------------------------------
Resolution: Done
HTable can still write data after calling the close method.
-----------------------------------------------------------
Key: HBASE-21392
URL: https://issues.apache.org/jira/browse/HBASE-21392
Project: HBase
Issue Type: Improvement
Components: Client
Affects Versions: 1.2.0, 2.1.0, 2.0.0
Environment: HBase 1.2.0
Reporter: lixiaobao
Assignee: lixiaobao
Priority: Major
Fix For: 3.0.0, 2.0.1, 2.0.0
Attachments: HBASE-21392.patch
Original Estimate: 1h
Remaining Estimate: 1h
HTable can still write data after calling the close method.
 
{code:java}
val conn = ConnectionFactory.createConnection(conf)
var table = conn.getTable(TableName.valueOf(tableName))
val put = new Put(rowKey.getBytes())
put.addColumn("cf".getBytes(), columnField.getBytes(), endTimeLong, Bytes.toBytes(line.getLong(8)))
table.put(put)
//call table close() method
table.close()
//put again
val put1 = new Put(rowKey4.getBytes())
out1.addColumn("cf".getBytes(), columnField.getBytes(), endTimeLong, Bytes.toBytes(line.getLong(8)))
table.put(put1)
{code}
 
after call close method ,can alse write data into HBase,I think this does not match close logic.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
Allan Yang (JIRA)
2018-11-28 08:37:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/HBASE-21392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Allan Yang reopened HBASE-21392:
--------------------------------
HTable can still write data after calling the close method.
-----------------------------------------------------------
Key: HBASE-21392
URL: https://issues.apache.org/jira/browse/HBASE-21392
Project: HBase
Issue Type: Improvement
Components: Client
Affects Versions: 1.2.0, 2.1.0, 2.0.0
Environment: HBase 1.2.0
Reporter: lixiaobao
Assignee: lixiaobao
Priority: Major
Attachments: HBASE-21392.patch
Original Estimate: 1h
Remaining Estimate: 1h
HTable can still write data after calling the close method.
 
{code:java}
val conn = ConnectionFactory.createConnection(conf)
var table = conn.getTable(TableName.valueOf(tableName))
val put = new Put(rowKey.getBytes())
put.addColumn("cf".getBytes(), columnField.getBytes(), endTimeLong, Bytes.toBytes(line.getLong(8)))
table.put(put)
//call table close() method
table.close()
//put again
val put1 = new Put(rowKey4.getBytes())
out1.addColumn("cf".getBytes(), columnField.getBytes(), endTimeLong, Bytes.toBytes(line.getLong(8)))
table.put(put1)
{code}
 
after call close method ,can alse write data into HBase,I think this does not match close logic.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Loading...