Liu Shaohui created HBASE-15391:
-----------------------------------

             Summary: Avoid too large "deleted from META" info log
                 Key: HBASE-15391
                 URL: https://issues.apache.org/jira/browse/HBASE-15391
             Project: HBase
          Issue Type: Improvement
            Reporter: Liu Shaohui
            Assignee: Liu Shaohui
            Priority: Minor
             Fix For: 2.0.0


When deleting a large table in HBase, there will be a large info log in HMaster.
{code}
2016-02-29,05:58:45,920 INFO org.apache.hadoop.hbase.catalog.MetaEditor: 
Deleted [{ENCODED => 4b54572150941cd03f5addfdeab0a754, NAME => 
'YCSBTest,,1453186492932.4b54572150941cd03f5addfdeab0a754.', STARTKEY => '', 
ENDKEY => 'user01'}, {ENCODED => 715e142bcd6a31d7842abf286ef8a5fe, NAME => 
'YCSBTest,user01,1453186492933.715e142bcd6a31d7842abf286ef8a5fe.', STARTKEY => 
'user01', ENDKEY => 'user02'}, {ENCODED => 5f9cef5714973f13baa63fba29a68d70, 
NAME => 'YCSBTest,user02,1453186492933.5f9cef5714973f13baa63fba29a68d70.', 
STARTKEY => 'user02', ENDKEY => 'user03'}, {ENCODED => 
86cf3fa4c0a6b911275512c1d4b78533, NAME => 'YCSBTest,user0...
{code}
The reason is that MetaTableAccessor will log all regions when deleting them 
from meta. See, MetaTableAccessor.java#deleteRegions
{code}
  public static void deleteRegions(Connection connection,
                                   List<HRegionInfo> regionsInfo, long ts) 
throws IOException {
    List<Delete> deletes = new ArrayList<Delete>(regionsInfo.size());
    for (HRegionInfo hri: regionsInfo) {
      Delete e = new Delete(hri.getRegionName());
      e.addFamily(getCatalogFamily(), ts);
      deletes.add(e);
    }
    deleteFromMetaTable(connection, deletes);
    LOG.info("Deleted " + regionsInfo);
  }
{code}
Just change the info log to debug and add a info log about the number of 
deleted regions. Others suggestions are welcomed~



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

Reply via email to