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

PropertyFileSnitch's ResourceWatcher fails because it uses FBUtilities.resourceToFile(..) while PropertyFileSnitch uses classloader.getResourceAsStream(..)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.8.6
    • None
    • None
    • Low

    Description

      Resource files are not necessarily plain files. They could be inside a jar file. See CASSANDRA-2036

      This will cause

      RROR 24:15,806 ResourceWatcher$WatchedResource: Timed run of class org.apache.cassandra.locator.PropertyFileSnitch$1 failed.
      org.apache.cassandra.config.ConfigurationException: unable to locate cassandra-topology.properties
      	at org.apache.cassandra.utils.FBUtilities.resourceToFile(FBUtilities.java:467)
      	at org.apache.cassandra.utils.ResourceWatcher$WatchedResource.run(ResourceWatcher.java:57)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)

      Attachments

        1. CASSANDRA-3138.patch
          1 kB
          Michael Semb Wever

        Activity

          People

            mck Michael Semb Wever
            mck Michael Semb Wever
            Michael Semb Wever
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: