Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-17595

nodetool enablefullquerylog can NPE when directory has no files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.1-alpha1, 4.1
    • Tool/fql
    • None

    Description

      fqltool_test.py::TestFQLTool::test_unclean_enable found an issue with org.apache.cassandra.utils.binlog.BinLog#deleteRecursively, it assumes listing files returns empty list rather than null and throws a NPE

      E           -- StackTrace --
      E           java.lang.NullPointerException
      E           	at org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:490)
      E           	at org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477)
      E           	at org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436)
      E           	at org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106)
      E           	at org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:6495)
      E           	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      E           	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      E           	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      E           	at java.lang.reflect.Method.invoke(Method.java:498)
      E           	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72)
      E           	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      E           	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      E           	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      E           	at java.lang.reflect.Method.invoke(Method.java:498)
      E           	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276)
      E           	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
      E           	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
      E           	at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
      E           	at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
      E           	at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
      E           	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      E           	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
      E           	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
      E           	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
      E           	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
      E           	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
      E           	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
      

      Attachments

        Issue Links

          Activity

            People

              dcapwell David Capwell
              dcapwell David Capwell
              David Capwell
              Jon Meredith
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m