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

sstablerepairedset throws exception while loading metadata

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 3.0 beta 2
    • Component/s: Legacy/Tools
    • Labels:
      None
    • Severity:
      Normal

      Description

      sstablerepairedset displays exception trying to load schema through DatabaseDescriptor.

      $ ./tools/bin/sstablerepairedset --really-set --is-repaired ~/.ccm/3.0/node1/data/keyspace1/standard1-2c0b226046aa11e596f58106a0d438e8/ma-1-big-Data.db
      14:42:36.714 [main] DEBUG o.a.c.i.s.m.MetadataSerializer - Mutating /home/yuki/.ccm/3.0/node1/data/keyspace1/standard1-2c0b226046aa11e596f58106a0d438e8/ma-1-big-Statistics.db to repairedAt time 1440013248000
      14:42:36.721 [main] DEBUG o.a.c.i.s.m.MetadataSerializer - Load metadata for /home/yuki/.ccm/3.0/node1/data/keyspace1/standard1-2c0b226046aa11e596f58106a0d438e8/ma-1-big
      Exception in thread "main" java.lang.ExceptionInInitializerError
              at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:123)
              at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:110)
              at org.apache.cassandra.utils.memory.BufferPool.<clinit>(BufferPool.java:51)
              at org.apache.cassandra.io.util.RandomAccessReader.allocateBuffer(RandomAccessReader.java:76)
              at org.apache.cassandra.io.util.RandomAccessReader.<init>(RandomAccessReader.java:58)
              at org.apache.cassandra.io.util.RandomAccessReader$RandomAccessReaderWithChannel.<init>(RandomAccessReader.java:89)
              at org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:108)
              at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.deserialize(MetadataSerializer.java:91)
              at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.mutateRepairedAt(MetadataSerializer.java:143)
              at org.apache.cassandra.tools.SSTableRepairedAtSetter.main(SSTableRepairedAtSetter.java:86)
      Caused by: org.apache.cassandra.exceptions.ConfigurationException: Expecting URI in variable: [cassandra.config]. Found[cassandra.yaml]. Please prefix the file with [file:///] for local files and [file://<server>/] for remote files. If you are executing this from an external tool, it needs to set Config.setClientMode(true) to avoid loading configuration.
              at org.apache.cassandra.config.YamlConfigurationLoader.getStorageConfigURL(YamlConfigurationLoader.java:78)
              at org.apache.cassandra.config.YamlConfigurationLoader.<clinit>(YamlConfigurationLoader.java:92)
              ... 10 more
      

      MetadataSerializer uses RandomAccessReader which allocates buffer through BufferPool. BufferPool gets its settings from DatabaseDescriptor and it won't work in offline tool.

        Attachments

          Activity

            People

            • Assignee:
              yukim Yuki Morishita
              Reporter:
              yukim Yuki Morishita
              Authors:
              Yuki Morishita
              Reviewers:
              Marcus Eriksson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: