cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iamaleksey <...@git.apache.org>
Subject [GitHub] cassandra pull request #239: [CASSANDRA-14556] Optimize Streaming
Date Fri, 27 Jul 2018 11:55:41 GMT
Github user iamaleksey commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/239#discussion_r205746338
  
    --- Diff: src/java/org/apache/cassandra/db/streaming/CassandraOutgoingFile.java ---
    @@ -18,51 +18,102 @@
     
     package org.apache.cassandra.db.streaming;
     
    +import java.io.File;
     import java.io.IOException;
    +import java.util.Collection;
    +import java.util.LinkedHashMap;
     import java.util.List;
     import java.util.Objects;
     import java.util.UUID;
     
     import com.google.common.annotations.VisibleForTesting;
     import com.google.common.base.Preconditions;
    +import com.google.common.collect.ImmutableList;
     
    +import org.apache.cassandra.config.DatabaseDescriptor;
    +import org.apache.cassandra.db.ColumnFamilyStore;
    +import org.apache.cassandra.db.DecoratedKey;
    +import org.apache.cassandra.db.compaction.AbstractCompactionStrategy;
    +import org.apache.cassandra.db.compaction.LeveledCompactionStrategy;
    +import org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy;
    +import org.apache.cassandra.dht.Range;
    +import org.apache.cassandra.dht.Token;
    +import org.apache.cassandra.io.sstable.Component;
    +import org.apache.cassandra.io.sstable.KeyIterator;
     import org.apache.cassandra.io.sstable.format.SSTableReader;
     import org.apache.cassandra.io.util.DataOutputStreamPlus;
    +import org.apache.cassandra.net.async.ByteBufDataOutputStreamPlus;
     import org.apache.cassandra.schema.TableId;
     import org.apache.cassandra.streaming.OutgoingStream;
     import org.apache.cassandra.streaming.StreamOperation;
     import org.apache.cassandra.streaming.StreamSession;
     import org.apache.cassandra.utils.concurrent.Ref;
     
    +import static org.apache.cassandra.db.compaction.Verifier.RangeOwnHelper;
    +
     /**
      * used to transfer the part(or whole) of a SSTable data file
      */
     public class CassandraOutgoingFile implements OutgoingStream
     {
    +    private static final boolean isZeroCopySSTableTransfersEnabled = DatabaseDescriptor.isZeroCopySSTableTransfersEnabled();
    --- End diff --
    
    Can get rid of this field now that `DatabaseDescriptor.isZeroCopySSTableTransferEnabled()`
just reads a field from `Config`.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message