Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-1155

Add waiting time for getMetastoreClient for avoiding metastore isn't ready

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.7.0
    • None
    • None

    Description

      For TestMetastoreEndToEnd, If metastore didn't finish the initialization. context.getMetaStoreClient will throw exception.

      HiveMetaStoreClient client = context.getMetaStoreClient(ADMIN1);
      

      We should wait for the initialization of metastore, for example:

          HiveMetaStoreClient client = null;
          for (int i=0; i < 10; i++) {
            try {
              client = context.getMetaStoreClient(ADMIN1);
              break;
            } catch (Throwable e) {
              // ignore
            }
            Thread.sleep(6000);
          }
      

      Attachments

        1. SENTRY-1155.001.patch
          1 kB
          Dapeng Sun
        2. SENTRY-1155.002.patch
          2 kB
          Dapeng Sun

        Activity

          People

            dapengsun Dapeng Sun
            dapengsun Dapeng Sun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: