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

Deprecate Throwables.propagate usage

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Low
    • Resolution: Unresolved
    • Fix Version/s: 4.x
    • Component/s: Dependencies
    • Labels:
    • Complexity:
      Low Hanging Fruit

      Description

      Google decided to deprecate guava Throwables.propagate method:

      We have 35 occurences in the trunk:

      $ rg -c 'Throwables.propagate' *
      src/java/org/apache/cassandra/streaming/StreamReader.java:1
      src/java/org/apache/cassandra/streaming/StreamTransferTask.java:1
      src/java/org/apache/cassandra/db/SnapshotDetailsTabularData.java:1
      src/java/org/apache/cassandra/db/Memtable.java:1
      src/java/org/apache/cassandra/db/ColumnFamilyStore.java:4
      src/java/org/apache/cassandra/cache/ChunkCache.java:2
      src/java/org/apache/cassandra/utils/WrappedRunnable.java:1
      src/java/org/apache/cassandra/hints/Hint.java:1
      src/java/org/apache/cassandra/tools/LoaderOptions.java:1
      src/java/org/apache/cassandra/tools/SSTableOfflineRelevel.java:1
      src/java/org/apache/cassandra/streaming/management/ProgressInfoCompositeData.java:3
      src/java/org/apache/cassandra/streaming/management/StreamStateCompositeData.java:2
      src/java/org/apache/cassandra/streaming/management/StreamSummaryCompositeData.java:2
      src/java/org/apache/cassandra/streaming/compress/CompressedStreamReader.java:1
      src/java/org/apache/cassandra/db/compaction/Scrubber.java:1
      src/java/org/apache/cassandra/db/compaction/Verifier.java:1
      src/java/org/apache/cassandra/db/compaction/CompactionHistoryTabularData.java:1
      src/java/org/apache/cassandra/db/compaction/Upgrader.java:1
      src/java/org/apache/cassandra/io/compress/CompressionMetadata.java:1
      src/java/org/apache/cassandra/streaming/management/SessionCompleteEventCompositeData.java:2
      src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java:1
      src/java/org/apache/cassandra/io/sstable/ISSTableScanner.java:1
      src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java:3
      src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java:1
      

      I don't know if we want to remove all usages but we should at least check author's intention for each usage and refactor if needed.

        Attachments

        1. 14218-trunk.txt
          22 kB
          Kirk True
        2. 14218-trunk.txt
          23 kB
          Kirk True

          Issue Links

            Activity

              People

              • Assignee:
                kirktrue Kirk True
                Reporter:
                rha Romain Hardouin
                Authors:
                Kirk True
                Reviewers:
                Dinesh Joshi
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: