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

Improve error handling - ArrayIndexOutOfBoundsException in PathsUpdate.parsePath can cause MetastoreCacheInitializer intialization to fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0, 2.0.0
    • None
    • None

    Description

      We should handle this gracefully. Instead of just throwing ArrayIndexOutOfBound, logging the path would be helpful

      2016-04-12 14:53:28,924 ERROR org.apache.sentry.hdfs.MetastorePlugin: [main]: #### Could not create Initial AuthzPaths or HMSHandler !!
      java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.apache.sentry.hdfs.MetastoreCacheInitializer.createInitialUpdate(MetastoreCacheInitializer.java:242)
      at org.apache.sentry.hdfs.MetastorePlugin$1.run(MetastorePlugin.java:160)
      at org.apache.sentry.hdfs.MetastorePlugin.<init>(MetastorePlugin.java:197)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at org.apache.sentry.binding.metastore.SentryMetastorePostEventListener.<init>(SentryMetastorePostEventListener.java:78)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at org.apache.hadoop.hive.metastore.MetaStoreUtils.getMetaStoreListeners(MetaStoreUtils.java:1439)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:485)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:78)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:84)
      at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5775)
      at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5770)
      at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:6022)
      at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:5947)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.apache.sentry.hdfs.PathsUpdate.parsePath(PathsUpdate.java:109)
      at org.apache.sentry.hdfs.MetastoreCacheInitializer$DbTask.doTask(MetastoreCacheInitializer.java:176)
      at org.apache.sentry.hdfs.MetastoreCacheInitializer$BaseTask.call(MetastoreCacheInitializer.java:61)
      at org.apache.sentry.hdfs.MetastoreCacheInitializer$BaseTask.call(MetastoreCacheInitializer.java:53)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      

      Attachments

        1. SENTRY-1260.0.patch
          20 kB
          Sravya Tirukkovalur
        2. SENTRY-1260.1.patch
          23 kB
          Sravya Tirukkovalur
        3. SENTRY-1260.2.patch
          23 kB
          Sravya Tirukkovalur
        4. SENTRY-1260.3.patch
          23 kB
          Sravya Tirukkovalur
        5. SENTRY-1260.4.patch
          23 kB
          Sravya Tirukkovalur

        Issue Links

          Activity

            People

              sravya Sravya Tirukkovalur
              sravya Sravya Tirukkovalur
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: