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

Unclosed HBaseAdmin in ToolUtil#getHBaseMetaStoreId()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • v1.5.2
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: