Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-1638

Unclosed HBaseAdmin in ToolUtil#getHBaseMetaStoreId()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.5.2
    • Component/s: None
    • Labels:
      None

      Description

          public static String getHBaseMetaStoreId() throws IOException {
              final HBaseAdmin hbaseAdmin = new HBaseAdmin(HBaseConfiguration.create(HadoopUtil.getCurrentConfiguration()));
              final String metaStoreName = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix();
              final HTableDescriptor desc = hbaseAdmin.getTableDescriptor(TableName.valueOf(metaStoreName));
              return "MetaStore UUID: " + desc.getValue(HBaseConnection.HTABLE_UUID_TAG);
      

      hbaseAdmin should be closed upon return.

        Attachments

          Activity

            People

            • Assignee:
              lidong_sjtu Dong Li
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: