apache/accumulo

PrintInfo prints exceptions and stack traces for old RFiles

Closed this issue · 2 comments

Describe the bug
When running PrintInfo on a rfile written using an older version of Accumulo, it's likely that PrintInfo will show errors. For example, the call to PrintInfo.printCryptoParams will log an error. Likewise, SummaryReader.print will also raise an error if there is no summary information. It might make sense to use the RFile version number to determine which things to try and print, or use the RFile version number to suppress errors for things that don't match between the runtime version and the file version.

Versions (OS, Maven, Java, and others, as appropriate):

  • Affected version(s) of this project: 2.1

To Reproduce
Run the 2.1 rfile-info utility on a file created with Accumulo 1.10. Try it with the --summary option when there are no summaries to see the mentioned exception.

Expected behavior
The PrintInfo utility should print information about the file. It should not print errors and stack traces for things that it cannot find or that do not exist.

Stack traces / errors seen:

java.io.EOFException: Length to read: X actual: Y
  at IOUtils.readFully (IOUtils.java:2080)
  at IOUtils.readFully (IOUtils.java:2056)
  at CryptoUtils.readParams (CryptoUtils.java:41)
  at PrintInfo.printCryptoParams (PrintInfo.java:335)
  at PrintInfo.execute (PrintInfo.java:196)

With the --summary option, the following error kills the rfile-info thread:

org.apache.accumulo.core.file.NoSuchMetaStoreException: name = accumulo.summaries.index
  at RFile$Reader.getMetaStore (RFile.java:1385)
  at SummaryReader.load (SummaryReader.java:129)
  at SummaryReader.print (SummaryReader.java:231)
  at PrintInfo.execute (PrintInfo.java:280)

This seems to only be an issue with the rfile-info command.
Accumulo is able to bulk import the old files and read them successfully.