You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2012/02/27 11:32:02 UTC
[10/16] [3649] Strip end of line whitespaces
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/dht/BytesToken.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/dht/BytesToken.java b/src/java/org/apache/cassandra/dht/BytesToken.java
index 2026f12..c3190b8 100644
--- a/src/java/org/apache/cassandra/dht/BytesToken.java
+++ b/src/java/org/apache/cassandra/dht/BytesToken.java
@@ -46,10 +46,10 @@ public class BytesToken extends Token<byte[]>
}
public int compareTo(Token<byte[]> o)
- {
+ {
return FBUtilities.compareUnsigned(token, o.token, 0, 0, token.length, o.token.length);
}
-
+
@Override
public int hashCode()
@@ -66,7 +66,7 @@ public class BytesToken extends Token<byte[]>
if (!(obj instanceof BytesToken))
return false;
BytesToken other = (BytesToken) obj;
-
+
return Arrays.equals(token, other.token);
}
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/dht/IPartitioner.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/dht/IPartitioner.java b/src/java/org/apache/cassandra/dht/IPartitioner.java
index aaa75fa..0b8c28c 100644
--- a/src/java/org/apache/cassandra/dht/IPartitioner.java
+++ b/src/java/org/apache/cassandra/dht/IPartitioner.java
@@ -30,11 +30,11 @@ public interface IPartitioner<T extends Token>
* @deprecated Used by SSTables before version 'e'.
*
* Convert the on disk representation to a DecoratedKey object
- * @param key On disk representation
+ * @param key On disk representation
* @return DecoratedKey object
*/
public DecoratedKey<T> convertFromDiskFormat(ByteBuffer key);
-
+
/**
* Transform key to object representation of the on-disk format.
*
@@ -69,7 +69,7 @@ public interface IPartitioner<T extends Token>
public T getRandomToken();
public Token.TokenFactory getTokenFactory();
-
+
/**
* @return True if the implementing class preserves key order in the Tokens
* it generates.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/dht/LocalPartitioner.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/dht/LocalPartitioner.java b/src/java/org/apache/cassandra/dht/LocalPartitioner.java
index 8c4be42..b5b9812 100644
--- a/src/java/org/apache/cassandra/dht/LocalPartitioner.java
+++ b/src/java/org/apache/cassandra/dht/LocalPartitioner.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java b/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
index 6c781f0..fb69e3d 100644
--- a/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
+++ b/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
@@ -41,7 +41,7 @@ public class OrderPreservingPartitioner extends AbstractPartitioner<StringToken>
{
return new DecoratedKey<StringToken>(getToken(key), key);
}
-
+
public DecoratedKey<StringToken> convertFromDiskFormat(ByteBuffer key)
{
return new DecoratedKey<StringToken>(getToken(key), key);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/dht/RandomPartitioner.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/dht/RandomPartitioner.java b/src/java/org/apache/cassandra/dht/RandomPartitioner.java
index c4c9091..15364d3 100644
--- a/src/java/org/apache/cassandra/dht/RandomPartitioner.java
+++ b/src/java/org/apache/cassandra/dht/RandomPartitioner.java
@@ -46,7 +46,7 @@ public class RandomPartitioner extends AbstractPartitioner<BigIntegerToken>
{
return new DecoratedKey<BigIntegerToken>(getToken(key), key);
}
-
+
public DecoratedKey<BigIntegerToken> convertFromDiskFormat(ByteBuffer fromdisk)
{
// find the delimiter position
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/ApplicationState.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/ApplicationState.java b/src/java/org/apache/cassandra/gms/ApplicationState.java
index 9209c3c..e966c96 100644
--- a/src/java/org/apache/cassandra/gms/ApplicationState.java
+++ b/src/java/org/apache/cassandra/gms/ApplicationState.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.gms;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.gms;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/EndpointState.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/EndpointState.java b/src/java/org/apache/cassandra/gms/EndpointState.java
index 0e643cd..1cd8e7f 100644
--- a/src/java/org/apache/cassandra/gms/EndpointState.java
+++ b/src/java/org/apache/cassandra/gms/EndpointState.java
@@ -41,7 +41,7 @@ public class EndpointState
private volatile HeartBeatState hbState;
final Map<ApplicationState, VersionedValue> applicationState = new NonBlockingHashMap<ApplicationState, VersionedValue>();
-
+
/* fields below do not get serialized */
private volatile long updateTimestamp;
private volatile boolean isAlive;
@@ -50,19 +50,19 @@ public class EndpointState
{
return serializer;
}
-
+
EndpointState(HeartBeatState initialHbState)
- {
+ {
hbState = initialHbState;
updateTimestamp = System.currentTimeMillis();
isAlive = true;
}
-
+
HeartBeatState getHeartBeatState()
{
return hbState;
}
-
+
void setHeartBeatState(HeartBeatState newHbState)
{
updateTimestamp();
@@ -82,7 +82,7 @@ public class EndpointState
{
return applicationState;
}
-
+
void addApplicationState(ApplicationState key, VersionedValue value)
{
applicationState.put(key, value);
@@ -93,14 +93,14 @@ public class EndpointState
{
return updateTimestamp;
}
-
+
void updateTimestamp()
{
updateTimestamp = System.currentTimeMillis();
}
-
+
public boolean isAlive()
- {
+ {
return isAlive;
}
@@ -110,7 +110,7 @@ public class EndpointState
}
void markDead()
- {
+ {
isAlive = false;
}
}
@@ -118,7 +118,7 @@ public class EndpointState
class EndpointStateSerializer implements IVersionedSerializer<EndpointState>
{
private static Logger logger = LoggerFactory.getLogger(EndpointStateSerializer.class);
-
+
public void serialize(EndpointState epState, DataOutput dos, int version) throws IOException
{
/* serialize the HeartBeatState */
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/FailureDetector.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/FailureDetector.java b/src/java/org/apache/cassandra/gms/FailureDetector.java
index 191f743..c8ba43a 100644
--- a/src/java/org/apache/cassandra/gms/FailureDetector.java
+++ b/src/java/org/apache/cassandra/gms/FailureDetector.java
@@ -38,7 +38,7 @@ import org.apache.cassandra.utils.FBUtilities;
/**
* This FailureDetector is an implementation of the paper titled
- * "The Phi Accrual Failure Detector" by Hayashibara.
+ * "The Phi Accrual Failure Detector" by Hayashibara.
* Check the paper and the <i>IFailureDetector</i> interface for details.
*/
public class FailureDetector implements IFailureDetector, FailureDetectorMBean
@@ -51,7 +51,7 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
private Map<InetAddress, ArrivalWindow> arrivalSamples_ = new Hashtable<InetAddress, ArrivalWindow>();
private List<IFailureDetectionEventListener> fdEvntListeners_ = new CopyOnWriteArrayList<IFailureDetectionEventListener>();
-
+
public FailureDetector()
{
phiConvictThreshold_ = DatabaseDescriptor.getPhiConvictThreshold();
@@ -66,7 +66,7 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
throw new RuntimeException(e);
}
}
-
+
public String getAllEndpointStates()
{
StringBuilder sb = new StringBuilder();
@@ -126,7 +126,7 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
FileUtils.closeQuietly(os);
}
}
-
+
public void setPhiConvictThreshold(int phi)
{
phiConvictThreshold_ = phi;
@@ -136,7 +136,7 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
{
return phiConvictThreshold_;
}
-
+
public boolean isAlive(InetAddress ep)
{
if (ep.equals(FBUtilities.getBroadcastAddress()))
@@ -171,19 +171,19 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
}
heartbeatWindow.add(now);
}
-
+
public void interpret(InetAddress ep)
{
ArrivalWindow hbWnd = arrivalSamples_.get(ep);
if ( hbWnd == null )
- {
+ {
return;
}
long now = System.currentTimeMillis();
double phi = hbWnd.phi(now);
if (logger_.isTraceEnabled())
logger_.trace("PHI for " + ep + " : " + phi);
-
+
if ( phi > phiConvictThreshold_ )
{
logger_.trace("notifying listeners that {} is down", ep);
@@ -192,29 +192,29 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
{
listener.convict(ep, phi);
}
- }
+ }
}
public void remove(InetAddress ep)
{
arrivalSamples_.remove(ep);
}
-
+
public void registerFailureDetectionEventListener(IFailureDetectionEventListener listener)
{
fdEvntListeners_.add(listener);
}
-
+
public void unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener)
{
fdEvntListeners_.remove(listener);
}
-
+
public String toString()
{
StringBuilder sb = new StringBuilder();
Set<InetAddress> eps = arrivalSamples_.keySet();
-
+
sb.append("-----------------------------------------------------------------------");
for ( InetAddress ep : eps )
{
@@ -226,9 +226,9 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
sb.append("-----------------------------------------------------------------------");
return sb.toString();
}
-
+
public static void main(String[] args) throws Throwable
- {
+ {
}
}
@@ -253,12 +253,12 @@ class ArrivalWindow
{
arrivalIntervals_ = new BoundedStatsDeque(size);
}
-
+
synchronized void add(double value)
{
double interArrivalTime;
if ( tLast_ > 0L )
- {
+ {
interArrivalTime = (value - tLast_);
}
else
@@ -271,32 +271,32 @@ class ArrivalWindow
logger_.debug("Ignoring interval time of {}", interArrivalTime);
tLast_ = value;
}
-
+
synchronized double sum()
{
return arrivalIntervals_.sum();
}
-
+
synchronized double sumOfDeviations()
{
return arrivalIntervals_.sumOfDeviations();
}
-
+
synchronized double mean()
{
return arrivalIntervals_.mean();
}
-
+
synchronized double variance()
{
return arrivalIntervals_.variance();
}
-
+
double stdev()
{
return arrivalIntervals_.stdev();
}
-
+
void clear()
{
arrivalIntervals_.clear();
@@ -311,7 +311,7 @@ class ArrivalWindow
? PHI_FACTOR * t / mean()
: 0.0;
}
-
+
public String toString()
{
return StringUtils.join(arrivalIntervals_.iterator(), " ");
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/GossipDigest.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/GossipDigest.java b/src/java/org/apache/cassandra/gms/GossipDigest.java
index 3881fa8..4fe2118 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigest.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigest.java
@@ -25,7 +25,7 @@ import org.apache.cassandra.io.IVersionedSerializer;
import org.apache.cassandra.net.CompactEndpointSerializationHelper;
/**
- * Contains information about a specified list of Endpoints and the largest version
+ * Contains information about a specified list of Endpoints and the largest version
* of the state they have generated as known by the local endpoint.
*/
@@ -36,7 +36,7 @@ public class GossipDigest implements Comparable<GossipDigest>
{
serializer = new GossipDigestSerializer();
}
-
+
InetAddress endpoint;
int generation;
int maxVersion;
@@ -45,36 +45,36 @@ public class GossipDigest implements Comparable<GossipDigest>
{
return serializer;
}
-
+
GossipDigest(InetAddress ep, int gen, int version)
{
endpoint = ep;
generation = gen;
maxVersion = version;
}
-
+
InetAddress getEndpoint()
{
return endpoint;
}
-
+
int getGeneration()
{
return generation;
}
-
+
int getMaxVersion()
{
return maxVersion;
}
-
+
public int compareTo(GossipDigest gDigest)
{
if ( generation != gDigest.generation )
return ( generation - gDigest.generation );
return (maxVersion - gDigest.maxVersion);
}
-
+
public String toString()
{
StringBuilder sb = new StringBuilder();
@@ -88,9 +88,9 @@ public class GossipDigest implements Comparable<GossipDigest>
}
class GossipDigestSerializer implements IVersionedSerializer<GossipDigest>
-{
+{
public void serialize(GossipDigest gDigest, DataOutput dos, int version) throws IOException
- {
+ {
CompactEndpointSerializationHelper.serialize(gDigest.endpoint, dos);
dos.writeInt(gDigest.generation);
dos.writeInt(gDigest.maxVersion);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/GossipDigestAck2Message.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/GossipDigestAck2Message.java b/src/java/org/apache/cassandra/gms/GossipDigestAck2Message.java
index c2d0716..bf95772 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestAck2Message.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestAck2Message.java
@@ -27,7 +27,7 @@ import org.apache.cassandra.io.IVersionedSerializer;
/**
- * This message gets sent out as a result of the receipt of a GossipDigestAckMessage. This the
+ * This message gets sent out as a result of the receipt of a GossipDigestAckMessage. This the
* last stage of the 3 way messaging of the Gossip protocol.
*/
@@ -38,19 +38,19 @@ class GossipDigestAck2Message
{
serializer_ = new GossipDigestAck2MessageSerializer();
}
-
+
Map<InetAddress, EndpointState> epStateMap_ = new HashMap<InetAddress, EndpointState>();
public static IVersionedSerializer<GossipDigestAck2Message> serializer()
{
return serializer_;
}
-
+
GossipDigestAck2Message(Map<InetAddress, EndpointState> epStateMap)
{
epStateMap_ = epStateMap;
}
-
+
Map<InetAddress, EndpointState> getEndpointStateMap()
{
return epStateMap_;
@@ -68,7 +68,7 @@ class GossipDigestAck2MessageSerializer implements IVersionedSerializer<GossipDi
public GossipDigestAck2Message deserialize(DataInput dis, int version) throws IOException
{
Map<InetAddress, EndpointState> epStateMap = EndpointStatesSerializationHelper.deserialize(dis, version);
- return new GossipDigestAck2Message(epStateMap);
+ return new GossipDigestAck2Message(epStateMap);
}
public long serializedSize(GossipDigestAck2Message gossipDigestAck2Message, int version)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java b/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
index f102425..e9108e9 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.gms;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.gms;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/GossipDigestAckMessage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/GossipDigestAckMessage.java b/src/java/org/apache/cassandra/gms/GossipDigestAckMessage.java
index 0592c20..9dd09a0 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestAckMessage.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestAckMessage.java
@@ -41,26 +41,26 @@ class GossipDigestAckMessage
{
serializer_ = new GossipDigestAckMessageSerializer();
}
-
+
List<GossipDigest> gDigestList_ = new ArrayList<GossipDigest>();
Map<InetAddress, EndpointState> epStateMap_ = new HashMap<InetAddress, EndpointState>();
-
+
static IVersionedSerializer<GossipDigestAckMessage> serializer()
{
return serializer_;
}
-
+
GossipDigestAckMessage(List<GossipDigest> gDigestList, Map<InetAddress, EndpointState> epStateMap)
{
gDigestList_ = gDigestList;
epStateMap_ = epStateMap;
}
-
+
List<GossipDigest> getGossipDigestList()
{
return gDigestList_;
}
-
+
Map<InetAddress, EndpointState> getEndpointStateMap()
{
return epStateMap_;
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/GossipDigestAckVerbHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/GossipDigestAckVerbHandler.java b/src/java/org/apache/cassandra/gms/GossipDigestAckVerbHandler.java
index 2888863..7ea8de2 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestAckVerbHandler.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestAckVerbHandler.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.gms;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.gms;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/GossipDigestSynMessage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/GossipDigestSynMessage.java b/src/java/org/apache/cassandra/gms/GossipDigestSynMessage.java
index d003c0f..c2aadb5 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestSynMessage.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestSynMessage.java
@@ -34,8 +34,8 @@ import org.apache.cassandra.net.CompactEndpointSerializationHelper;
/**
- * This is the first message that gets sent out as a start of the Gossip protocol in a
- * round.
+ * This is the first message that gets sent out as a start of the Gossip protocol in a
+ * round.
*/
class GossipDigestSynMessage
@@ -45,7 +45,7 @@ class GossipDigestSynMessage
{
serializer_ = new GossipDigestSynMessageSerializer();
}
-
+
String clusterId_;
List<GossipDigest> gDigests_ = new ArrayList<GossipDigest>();
@@ -53,13 +53,13 @@ class GossipDigestSynMessage
{
return serializer_;
}
-
+
public GossipDigestSynMessage(String clusterId, List<GossipDigest> gDigests)
- {
+ {
clusterId_ = clusterId;
gDigests_ = gDigests;
}
-
+
List<GossipDigest> getGossipDigests()
{
return gDigests_;
@@ -69,7 +69,7 @@ class GossipDigestSynMessage
class GossipDigestSerializationHelper
{
private static Logger logger_ = LoggerFactory.getLogger(GossipDigestSerializationHelper.class);
-
+
static void serialize(List<GossipDigest> gDigestList, DataOutput dos, int version) throws IOException
{
dos.writeInt(gDigestList.size());
@@ -81,13 +81,13 @@ class GossipDigestSerializationHelper
static List<GossipDigest> deserialize(DataInput dis, int version) throws IOException
{
- int size = dis.readInt();
+ int size = dis.readInt();
List<GossipDigest> gDigests = new ArrayList<GossipDigest>(size);
-
+
for ( int i = 0; i < size; ++i )
{
gDigests.add(GossipDigest.serializer().deserialize(dis, version));
- }
+ }
return gDigests;
}
}
@@ -109,7 +109,7 @@ class EndpointStatesSerializationHelper
static Map<InetAddress, EndpointState> deserialize(DataInput dis, int version) throws IOException
{
- int size = dis.readInt();
+ int size = dis.readInt();
Map<InetAddress, EndpointState> epStateMap = new HashMap<InetAddress, EndpointState>(size);
for ( int i = 0; i < size; ++i )
@@ -123,9 +123,9 @@ class EndpointStatesSerializationHelper
}
class GossipDigestSynMessageSerializer implements IVersionedSerializer<GossipDigestSynMessage>
-{
+{
public void serialize(GossipDigestSynMessage gDigestSynMessage, DataOutput dos, int version) throws IOException
- {
+ {
dos.writeUTF(gDigestSynMessage.clusterId_);
GossipDigestSerializationHelper.serialize(gDigestSynMessage.gDigests_, dos, version);
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java b/src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java
index 026f3fe..bb0f397 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.gms;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.gms;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java b/src/java/org/apache/cassandra/gms/Gossiper.java
index b2dae2f..9db156e 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -66,7 +66,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
private static final DebuggableScheduledThreadPoolExecutor executor = new DebuggableScheduledThreadPoolExecutor("GossipTasks");
static final ApplicationState[] STATES = ApplicationState.values();
- static final List<String> DEAD_STATES = Arrays.asList(VersionedValue.REMOVING_TOKEN, VersionedValue.REMOVED_TOKEN,
+ static final List<String> DEAD_STATES = Arrays.asList(VersionedValue.REMOVING_TOKEN, VersionedValue.REMOVED_TOKEN,
VersionedValue.STATUS_LEFT, VersionedValue.HIBERNATE);
private ScheduledFuture<?> scheduledGossipTask;
@@ -75,7 +75,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
private static Logger logger = LoggerFactory.getLogger(Gossiper.class);
public static final Gossiper instance = new Gossiper();
- public static final long aVeryLongTime = 259200 * 1000; // 3 days
+ public static final long aVeryLongTime = 259200 * 1000; // 3 days
private long FatClientTimeout;
private Random random = new Random();
private Comparator<InetAddress> inetcomparator = new Comparator<InetAddress>()
@@ -106,9 +106,9 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
* after removal to prevent nodes from falsely reincarnating during the time when removal
* gossip gets propagated to all nodes */
private Map<InetAddress, Long> justRemovedEndpoints = new ConcurrentHashMap<InetAddress, Long>();
-
+
private Map<InetAddress, Long> expireTimeEndpointMap = new ConcurrentHashMap<InetAddress, Long>();
-
+
// protocol versions of the other nodes in the cluster
private final ConcurrentMap<InetAddress, Integer> versions = new NonBlockingHashMap<InetAddress, Integer>();
@@ -120,7 +120,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
{
//wait on messaging service to start listening
MessagingService.instance().waitUntilListening();
-
+
/* Update the local heartbeat counter. */
endpointStateMap.get(FBUtilities.getBroadcastAddress()).getHeartBeatState().updateHeartBeat();
if (logger.isTraceEnabled())
@@ -210,13 +210,13 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
{
subscribers.remove(subscriber);
}
-
+
public void setVersion(InetAddress address, int version)
{
logger.debug("Setting version {} for {}", version, address);
versions.put(address, version);
}
-
+
public void resetVersion(InetAddress endpoint)
{
logger.debug("Reseting version for {}", endpoint);
@@ -235,7 +235,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
else
return v;
}
-
+
public Set<InetAddress> getLiveMembers()
{
@@ -551,7 +551,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
catch (IOException ex)
{
throw new IOError(ex);
- }
+ }
return seeds.contains(to);
}
@@ -643,7 +643,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
}
}
}
-
+
if (!justRemovedEndpoints.isEmpty())
{
for (Entry<InetAddress, Long> entry : justRemovedEndpoints.entrySet())
@@ -657,7 +657,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
}
}
}
-
+
protected long getExpireTimeForEndpoint(InetAddress endpoint)
{
/* default expireTime is aVeryLongTime */
@@ -728,7 +728,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
EndpointState ep2 = getEndpointStateForEndpoint(addr2);
assert ep1 != null && ep2 != null;
return ep1.getHeartBeatState().getGeneration() - ep2.getHeartBeatState().getGeneration();
- }
+ }
void notifyFailureDetector(List<GossipDigest> gDigests)
{
@@ -1070,9 +1070,9 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
Gossiper.intervalInMillis,
TimeUnit.MILLISECONDS);
}
-
+
// initialize local HB state if needed.
- public void maybeInitializeLocalState(int generationNbr)
+ public void maybeInitializeLocalState(int generationNbr)
{
EndpointState localState = endpointStateMap.get(FBUtilities.getBroadcastAddress());
if ( localState == null )
@@ -1083,7 +1083,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
endpointStateMap.put(FBUtilities.getBroadcastAddress(), localState);
}
}
-
+
/**
* Add an endpoint we knew about previously, but whose state is unknown
@@ -1150,7 +1150,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
{
return getCurrentGenerationNumber(InetAddress.getByName(address));
}
-
+
public void addExpireTimeForEndpoint(InetAddress endpoint, long expireTime)
{
if (logger.isDebugEnabled())
@@ -1159,7 +1159,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
}
expireTimeEndpointMap.put(endpoint, expireTime);
}
-
+
public static long computeExpireTime() {
return System.currentTimeMillis() + Gossiper.aVeryLongTime;
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/HeartBeatState.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/HeartBeatState.java b/src/java/org/apache/cassandra/gms/HeartBeatState.java
index a71fead..7023f00 100644
--- a/src/java/org/apache/cassandra/gms/HeartBeatState.java
+++ b/src/java/org/apache/cassandra/gms/HeartBeatState.java
@@ -24,18 +24,18 @@ import org.apache.cassandra.io.IVersionedSerializer;
/**
- * HeartBeat State associated with any given endpoint.
+ * HeartBeat State associated with any given endpoint.
*/
class HeartBeatState
{
private static IVersionedSerializer<HeartBeatState> serializer;
-
+
static
{
serializer = new HeartBeatStateSerializer();
}
-
+
private int generation;
private int version;
@@ -43,7 +43,7 @@ class HeartBeatState
{
this(gen, 0);
}
-
+
HeartBeatState(int gen, int ver)
{
generation = gen;
@@ -54,7 +54,7 @@ class HeartBeatState
{
return serializer;
}
-
+
int getGeneration()
{
return generation;
@@ -64,7 +64,7 @@ class HeartBeatState
{
version = VersionGenerator.getNextVersion();
}
-
+
int getHeartBeatVersion()
{
return version;
@@ -83,7 +83,7 @@ class HeartBeatStateSerializer implements IVersionedSerializer<HeartBeatState>
dos.writeInt(hbState.getGeneration());
dos.writeInt(hbState.getHeartBeatVersion());
}
-
+
public HeartBeatState deserialize(DataInput dis, int version) throws IOException
{
return new HeartBeatState(dis.readInt(), dis.readInt());
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/IEndpointStateChangeSubscriber.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/IEndpointStateChangeSubscriber.java b/src/java/org/apache/cassandra/gms/IEndpointStateChangeSubscriber.java
index 17c69a7..60e5f2b 100644
--- a/src/java/org/apache/cassandra/gms/IEndpointStateChangeSubscriber.java
+++ b/src/java/org/apache/cassandra/gms/IEndpointStateChangeSubscriber.java
@@ -25,7 +25,7 @@ import java.net.InetAddress;
* interested parties about changes in the the state associated with any endpoint.
* For instance if node A figures there is a changes in state for an endpoint B
* it notifies all interested parties of this change. It is upto to the registered
- * instance to decide what he does with this change. Not all modules maybe interested
+ * instance to decide what he does with this change. Not all modules maybe interested
* in all state changes.
*/
@@ -34,7 +34,7 @@ public interface IEndpointStateChangeSubscriber
/**
* Use to inform interested parties about the change in the state
* for specified endpoint
- *
+ *
* @param endpoint endpoint for which the state change occurred.
* @param epState state that actually changed for the above endpoint.
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/IFailureDetectionEventListener.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/IFailureDetectionEventListener.java b/src/java/org/apache/cassandra/gms/IFailureDetectionEventListener.java
index c436211..717bac5 100644
--- a/src/java/org/apache/cassandra/gms/IFailureDetectionEventListener.java
+++ b/src/java/org/apache/cassandra/gms/IFailureDetectionEventListener.java
@@ -27,7 +27,7 @@ import java.net.InetAddress;
*/
public interface IFailureDetectionEventListener
-{
+{
/**
* Convict the specified endpoint.
* @param ep endpoint to be convicted
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/IFailureDetector.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/IFailureDetector.java b/src/java/org/apache/cassandra/gms/IFailureDetector.java
index df12bb4..d5bf9ec 100644
--- a/src/java/org/apache/cassandra/gms/IFailureDetector.java
+++ b/src/java/org/apache/cassandra/gms/IFailureDetector.java
@@ -22,7 +22,7 @@ import java.net.InetAddress;
/**
* An interface that provides an application with the ability
- * to query liveness information of a node in the cluster. It
+ * to query liveness information of a node in the cluster. It
* also exposes methods which help an application register callbacks
* for notifications of liveness information of nodes.
*/
@@ -32,7 +32,7 @@ public interface IFailureDetector
/**
* Failure Detector's knowledge of whether a node is up or
* down.
- *
+ *
* @param ep endpoint in question.
* @return true if UP and false if DOWN.
*/
@@ -45,19 +45,19 @@ public interface IFailureDetector
public void clear(InetAddress ep);
/**
- * This method is invoked by any entity wanting to interrogate the status of an endpoint.
+ * This method is invoked by any entity wanting to interrogate the status of an endpoint.
* In our case it would be the Gossiper. The Failure Detector will then calculate Phi and
- * deem an endpoint as suspicious or alive as explained in the Hayashibara paper.
- *
+ * deem an endpoint as suspicious or alive as explained in the Hayashibara paper.
+ *
* param ep endpoint for which we interpret the inter arrival times.
*/
public void interpret(InetAddress ep);
-
+
/**
* This method is invoked by the receiver of the heartbeat. In our case it would be
* the Gossiper. Gossiper inform the Failure Detector on receipt of a heartbeat. The
* FailureDetector will then sample the arrival time as explained in the paper.
- *
+ *
* param ep endpoint being reported.
*/
public void report(InetAddress ep);
@@ -66,16 +66,16 @@ public interface IFailureDetector
* remove endpoint from failure detector
*/
public void remove(InetAddress ep);
-
+
/**
- * Register interest for Failure Detector events.
- * @param listener implementation of an application provided IFailureDetectionEventListener
+ * Register interest for Failure Detector events.
+ * @param listener implementation of an application provided IFailureDetectionEventListener
*/
public void registerFailureDetectionEventListener(IFailureDetectionEventListener listener);
-
+
/**
- * Un-register interest for Failure Detector events.
- * @param listener implementation of an application provided IFailureDetectionEventListener
+ * Un-register interest for Failure Detector events.
+ * @param listener implementation of an application provided IFailureDetectionEventListener
*/
public void unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener);
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/IFailureNotification.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/IFailureNotification.java b/src/java/org/apache/cassandra/gms/IFailureNotification.java
index 1d09bf0..f2e801f 100644
--- a/src/java/org/apache/cassandra/gms/IFailureNotification.java
+++ b/src/java/org/apache/cassandra/gms/IFailureNotification.java
@@ -21,7 +21,7 @@ package org.apache.cassandra.gms;
import java.net.InetAddress;
public interface IFailureNotification
-{
+{
public void convict(InetAddress ep);
public void revive(InetAddress ep);
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/VersionGenerator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/VersionGenerator.java b/src/java/org/apache/cassandra/gms/VersionGenerator.java
index aaf75b0..77138de 100644
--- a/src/java/org/apache/cassandra/gms/VersionGenerator.java
+++ b/src/java/org/apache/cassandra/gms/VersionGenerator.java
@@ -21,14 +21,14 @@ package org.apache.cassandra.gms;
import java.util.concurrent.atomic.AtomicInteger;
/**
- * A unique version number generator for any state that is generated by the
+ * A unique version number generator for any state that is generated by the
* local node.
*/
public class VersionGenerator
{
private static AtomicInteger version_ = new AtomicInteger(0);
-
+
public static int getNextVersion()
{
return version_.incrementAndGet();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/gms/VersionedValue.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/VersionedValue.java b/src/java/org/apache/cassandra/gms/VersionedValue.java
index d4eca8e..85c9b38 100644
--- a/src/java/org/apache/cassandra/gms/VersionedValue.java
+++ b/src/java/org/apache/cassandra/gms/VersionedValue.java
@@ -30,12 +30,12 @@ import org.apache.cassandra.utils.FBUtilities;
/**
* This abstraction represents the state associated with a particular node which an
- * application wants to make available to the rest of the nodes in the cluster.
+ * application wants to make available to the rest of the nodes in the cluster.
* Whenever a piece of state needs to be disseminated to the rest of cluster wrap
* the state in an instance of <i>ApplicationState</i> and add it to the Gossiper.
- *
+ *
* e.g. if we want to disseminate load information for node A do the following:
- *
+ *
* ApplicationState loadState = new ApplicationState(<string representation of load>);
* Gossiper.instance.addApplicationState("LOAD STATE", loadState);
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java b/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
index ab2bae1..2bea14e 100644
--- a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
@@ -1,7 +1,7 @@
package org.apache.cassandra.hadoop;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -9,16 +9,16 @@ package org.apache.cassandra.hadoop;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
import java.io.IOException;
@@ -38,7 +38,7 @@ public class BulkOutputFormat extends OutputFormat<ByteBuffer,List<Mutation>>
implements org.apache.hadoop.mapred.OutputFormat<ByteBuffer,List<Mutation>>
{
private static final Logger logger = LoggerFactory.getLogger(BulkOutputFormat.class);
-
+
@Override
public void checkOutputSpecs(JobContext context)
{
@@ -58,7 +58,7 @@ public class BulkOutputFormat extends OutputFormat<ByteBuffer,List<Mutation>>
{
return new NullOutputCommitter();
}
-
+
/** Fills the deprecated OutputFormat interface for streaming. */
@Deprecated
public void checkOutputSpecs(org.apache.hadoop.fs.FileSystem filesystem, org.apache.hadoop.mapred.JobConf job) throws IOException
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java b/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
index 71ea2f4..74f1158 100644
--- a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
@@ -1,7 +1,7 @@
package org.apache.cassandra.hadoop;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -9,16 +9,16 @@ package org.apache.cassandra.hadoop;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
import java.io.File;
@@ -78,7 +78,7 @@ implements org.apache.hadoop.mapred.RecordWriter<ByteBuffer,List<Mutation>>
{
this(context.getConfiguration());
}
-
+
BulkRecordWriter(Configuration conf) throws IOException
{
Config.setLoadYaml(false);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
index 5bef55b..60f6af7 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
@@ -237,10 +237,10 @@ public class ColumnFamilyInputFormat extends InputFormat<ByteBuffer, SortedMap<B
for (int i = 0; i < range.rpc_endpoints.size(); i++)
{
String host = range.rpc_endpoints.get(i);
-
+
if (host == null || host.equals("0.0.0.0"))
host = range.endpoints.get(i);
-
+
try
{
Cassandra.Client client = ConfigHelper.createConnection(host, ConfigHelper.getInputRpcPort(conf), true);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
index fda2c22..ea2ef11 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
@@ -1,7 +1,7 @@
package org.apache.cassandra.hadoop;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -9,16 +9,16 @@ package org.apache.cassandra.hadoop;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
import java.io.IOException;
@@ -43,7 +43,7 @@ import org.apache.thrift.transport.TSocket;
* OutputFormat that allows reduce tasks to store keys (and corresponding
* values) as Cassandra rows (and respective columns) in a given
* ColumnFamily.
- *
+ *
* <p>
* As is the case with the {@link ColumnFamilyInputFormat}, you need to set the
* Keyspace and ColumnFamily in your
@@ -51,7 +51,7 @@ import org.apache.thrift.transport.TSocket;
* {@link ConfigHelper#setOutputColumnFamily} method, is provided to make this
* simple.
* </p>
- *
+ *
* <p>
* For the sake of performance, this class employs a lazy write-back caching
* mechanism, where its record writer batches mutations created based on the
@@ -63,13 +63,13 @@ public class ColumnFamilyOutputFormat extends OutputFormat<ByteBuffer,List<Mutat
implements org.apache.hadoop.mapred.OutputFormat<ByteBuffer,List<Mutation>>
{
private static final Logger logger = LoggerFactory.getLogger(ColumnFamilyOutputFormat.class);
-
+
public static final String BATCH_THRESHOLD = "mapreduce.output.columnfamilyoutputformat.batch.threshold";
public static final String QUEUE_SIZE = "mapreduce.output.columnfamilyoutputformat.queue.size";
/**
* Check for validity of the output-specification for the job.
- *
+ *
* @param context
* information about the job
* @throws IOException
@@ -95,7 +95,7 @@ public class ColumnFamilyOutputFormat extends OutputFormat<ByteBuffer,List<Mutat
/**
* The OutputCommitter for this format does not write any data to the DFS.
- *
+ *
* @param context
* the task context
* @return an output committer
@@ -107,7 +107,7 @@ public class ColumnFamilyOutputFormat extends OutputFormat<ByteBuffer,List<Mutat
{
return new NullOutputCommitter();
}
-
+
/** Fills the deprecated OutputFormat interface for streaming. */
@Deprecated
public void checkOutputSpecs(org.apache.hadoop.fs.FileSystem filesystem, org.apache.hadoop.mapred.JobConf job) throws IOException
@@ -124,7 +124,7 @@ public class ColumnFamilyOutputFormat extends OutputFormat<ByteBuffer,List<Mutat
/**
* Get the {@link RecordWriter} for the given task.
- *
+ *
* @param context
* the information about the current task.
* @return a {@link RecordWriter} to write the output for the job.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index 3c0360d..14d35ea 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.hadoop;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.hadoop;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
@@ -84,7 +84,7 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
this.keyBufferSize = keyBufferSize;
}
- public void close()
+ public void close()
{
if (socket != null && socket.isOpen())
{
@@ -93,7 +93,7 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
client = null;
}
}
-
+
public ByteBuffer getCurrentKey()
{
return currentRow.left;
@@ -103,35 +103,35 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
{
return currentRow.right;
}
-
+
public float getProgress()
{
// TODO this is totally broken for wide rows
// the progress is likely to be reported slightly off the actual but close enough
return ((float)iter.rowsRead()) / totalRowCount;
}
-
+
static boolean isEmptyPredicate(SlicePredicate predicate)
{
if (predicate == null)
return true;
-
+
if (predicate.isSetColumn_names() && predicate.getSlice_range() == null)
return false;
-
+
if (predicate.getSlice_range() == null)
return true;
-
+
byte[] start = predicate.getSlice_range().getStart();
- byte[] finish = predicate.getSlice_range().getFinish();
+ byte[] finish = predicate.getSlice_range().getFinish();
if ( (start == null || start == ArrayUtils.EMPTY_BYTE_ARRAY) &&
(finish == null || finish == ArrayUtils.EMPTY_BYTE_ARRAY) )
return true;
-
-
- return false;
+
+
+ return false;
}
-
+
public void initialize(InputSplit split, TaskAttemptContext context) throws IOException
{
this.split = (ColumnFamilySplit) split;
@@ -145,10 +145,10 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
batchSize = ConfigHelper.getRangeBatchSize(conf);
cfName = ConfigHelper.getInputColumnFamily(conf);
consistencyLevel = ConsistencyLevel.valueOf(ConfigHelper.getReadConsistencyLevel(conf));
-
-
+
+
keyspace = ConfigHelper.getInputKeyspace(conf);
-
+
try
{
// only need to connect once
@@ -180,7 +180,7 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
iter = widerows ? new WideRowIterator() : new StaticRowIterator();
}
-
+
public boolean nextKeyValue() throws IOException
{
if (!iter.hasNext())
@@ -459,7 +459,7 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
rows = null;
return;
}
-
+
// nothing new? reached the end
if (lastRow != null && (rows.get(0).key.equals(lastRow.key) || rows.get(0).columns.get(0).column.name.equals(startColumn)))
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
index 5dc7655..9c1639e 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
@@ -1,7 +1,7 @@
package org.apache.cassandra.hadoop;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -9,16 +9,16 @@ package org.apache.cassandra.hadoop;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
import java.io.IOException;
@@ -47,44 +47,44 @@ import org.apache.thrift.transport.TSocket;
* pairs to a Cassandra column family. In particular, it applies all mutations
* in the value, which it associates with the key, and in turn the responsible
* endpoint.
- *
+ *
* <p>
* Furthermore, this writer groups the mutations by the endpoint responsible for
* the rows being affected. This allows the mutations to be executed in parallel,
* directly to a responsible endpoint.
* </p>
- *
+ *
* @see ColumnFamilyOutputFormat
* @see OutputFormat
- *
+ *
*/
final class ColumnFamilyRecordWriter extends RecordWriter<ByteBuffer,List<Mutation>>
implements org.apache.hadoop.mapred.RecordWriter<ByteBuffer,List<Mutation>>
{
// The configuration this writer is associated with.
private final Configuration conf;
-
+
// The ring cache that describes the token ranges each node in the ring is
// responsible for. This is what allows us to group the mutations by
// the endpoints they should be targeted at. The targeted endpoint
// essentially
// acts as the primary replica for the rows being affected by the mutations.
private final RingCache ringCache;
-
+
// The number of mutations to buffer per endpoint
private final int queueSize;
// handles for clients for each range running in the threadpool
private final Map<Range,RangeClient> clients;
private final long batchThreshold;
-
+
private final ConsistencyLevel consistencyLevel;
/**
* Upon construction, obtain the map that this writer will use to collect
* mutations, and the ring cache for the given keyspace.
- *
+ *
* @param context the task attempt context
* @throws IOException
*/
@@ -92,7 +92,7 @@ implements org.apache.hadoop.mapred.RecordWriter<ByteBuffer,List<Mutation>>
{
this(context.getConfiguration());
}
-
+
ColumnFamilyRecordWriter(Configuration conf) throws IOException
{
this.conf = conf;
@@ -110,7 +110,7 @@ implements org.apache.hadoop.mapred.RecordWriter<ByteBuffer,List<Mutation>>
* {@link Deletion}. Similarly, if the entire value for a key is missing
* (i.e., null), then the entire key is marked for {@link Deletion}.
* </p>
- *
+ *
* @param keybuff
* the key to write.
* @param value
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/ColumnFamilySplit.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilySplit.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilySplit.java
index 110bc11..71a1c34 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilySplit.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilySplit.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.hadoop;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.hadoop;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
@@ -55,7 +55,7 @@ public class ColumnFamilySplit extends InputSplit implements Writable, org.apach
}
// getLength and getLocations satisfy the InputSplit abstraction
-
+
public long getLength()
{
// only used for sorting splits. we don't have the capability, yet.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
index c9ab70e..b2903a1 100644
--- a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.hadoop;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.hadoop;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
import java.io.IOException;
@@ -73,7 +73,7 @@ public class ConfigHelper
private static final String WRITE_CONSISTENCY_LEVEL = "cassandra.consistencylevel.write";
private static final String OUTPUT_COMPRESSION_CLASS = "cassandra.output.compression.class";
private static final String OUTPUT_COMPRESSION_CHUNK_LENGTH = "cassandra.output.compression.length";
-
+
private static final Logger logger = LoggerFactory.getLogger(ConfigHelper.class);
@@ -197,7 +197,7 @@ public class ConfigHelper
String s = conf.get(INPUT_PREDICATE_CONFIG);
return s == null ? null : predicateFromString(s);
}
-
+
private static String thriftToString(TBase object)
{
assert object != null;
@@ -286,17 +286,17 @@ public class ConfigHelper
{
return conf.get(INPUT_KEYSPACE_CONFIG);
}
-
+
public static String getOutputKeyspace(Configuration conf)
{
return conf.get(OUTPUT_KEYSPACE_CONFIG);
}
-
+
public static String getInputKeyspaceUserName(Configuration conf)
{
return conf.get(INPUT_KEYSPACE_USERNAME_CONFIG);
}
-
+
public static String getInputKeyspacePassword(Configuration conf)
{
return conf.get(INPUT_KEYSPACE_PASSWD_CONFIG);
@@ -306,7 +306,7 @@ public class ConfigHelper
{
return conf.get(OUTPUT_KEYSPACE_USERNAME_CONFIG);
}
-
+
public static String getOutputKeyspacePassword(Configuration conf)
{
return conf.get(OUTPUT_KEYSPACE_PASSWD_CONFIG);
@@ -321,7 +321,7 @@ public class ConfigHelper
{
return Boolean.valueOf(conf.get(INPUT_WIDEROWS_CONFIG));
}
-
+
public static String getOutputColumnFamily(Configuration conf)
{
return conf.get(OUTPUT_COLUMNFAMILY_CONFIG);
@@ -373,7 +373,7 @@ public class ConfigHelper
throw new RuntimeException(e);
}
}
-
+
public static int getOutputRpcPort(Configuration conf)
{
return Integer.parseInt(conf.get(OUTPUT_THRIFT_PORT, "9160"));
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index e96d15b..42eb2f9 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -79,7 +79,7 @@ public class CassandraStorage extends LoadFunc implements StoreFuncInterface, Lo
private final static String DEFAULT_INPUT_FORMAT = "org.apache.cassandra.hadoop.ColumnFamilyInputFormat";
private final static String DEFAULT_OUTPUT_FORMAT = "org.apache.cassandra.hadoop.ColumnFamilyOutputFormat";
-
+
private final static ByteBuffer BOUND = ByteBufferUtil.EMPTY_BYTE_BUFFER;
private static final Log logger = LogFactory.getLog(CassandraStorage.class);
@@ -113,7 +113,7 @@ public class CassandraStorage extends LoadFunc implements StoreFuncInterface, Lo
this.limit = limit;
}
- public int getLimit()
+ public int getLimit()
{
return limit;
}
@@ -382,7 +382,7 @@ public class CassandraStorage extends LoadFunc implements StoreFuncInterface, Lo
if (System.getenv(PIG_ALLOW_DELETES) != null)
allow_deletes = Boolean.valueOf(System.getenv(PIG_ALLOW_DELETES));
}
-
+
private String getFullyQualifiedClassName(String classname)
{
return classname.contains(".") ? classname : "org.apache.cassandra.hadoop." + classname;
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/ISerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/ISerializer.java b/src/java/org/apache/cassandra/io/ISerializer.java
index f4e165e..2419221 100644
--- a/src/java/org/apache/cassandra/io/ISerializer.java
+++ b/src/java/org/apache/cassandra/io/ISerializer.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/IVersionedSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/IVersionedSerializer.java b/src/java/org/apache/cassandra/io/IVersionedSerializer.java
index 254b111..23c55bf 100644
--- a/src/java/org/apache/cassandra/io/IVersionedSerializer.java
+++ b/src/java/org/apache/cassandra/io/IVersionedSerializer.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java b/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java
index 545b09e..6a466f7 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java
@@ -53,7 +53,7 @@ public class CompressedSequentialWriter extends SequentialWriter
private long originalSize = 0, compressedSize = 0;
private Collector sstableMetadataCollector;
-
+
public CompressedSequentialWriter(File file, String indexFilePath, boolean skipIOCache, CompressionParameters parameters, Collector sstableMetadataCollector) throws IOException
{
super(file, parameters.chunkLength(), skipIOCache);
@@ -90,7 +90,7 @@ public class CompressedSequentialWriter extends SequentialWriter
originalSize += validBufferBytes;
compressedSize += compressedLength;
-
+
// update checksum
checksum.update(buffer, 0, validBufferBytes);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/BloomFilterTracker.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/BloomFilterTracker.java b/src/java/org/apache/cassandra/io/sstable/BloomFilterTracker.java
index 80fdc7c..400bee8 100644
--- a/src/java/org/apache/cassandra/io/sstable/BloomFilterTracker.java
+++ b/src/java/org/apache/cassandra/io/sstable/BloomFilterTracker.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io.sstable;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io.sstable;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/Component.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/Component.java b/src/java/org/apache/cassandra/io/sstable/Component.java
index 9b85ace..4517244 100644
--- a/src/java/org/apache/cassandra/io/sstable/Component.java
+++ b/src/java/org/apache/cassandra/io/sstable/Component.java
@@ -1,5 +1,5 @@
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
package org.apache.cassandra.io.sstable;
@@ -61,7 +61,7 @@ public class Component
{
this.repr = repr;
}
-
+
static Type fromRepresentation(String repr)
{
for (Type type : TYPES)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/Descriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/Descriptor.java b/src/java/org/apache/cassandra/io/sstable/Descriptor.java
index 078e2f2..cf767ff 100644
--- a/src/java/org/apache/cassandra/io/sstable/Descriptor.java
+++ b/src/java/org/apache/cassandra/io/sstable/Descriptor.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io.sstable;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io.sstable;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
@@ -117,7 +117,7 @@ public class Descriptor
{
return filenameFor(component.name());
}
-
+
private String baseFilename()
{
StringBuilder buff = new StringBuilder();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/KeyIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/KeyIterator.java b/src/java/org/apache/cassandra/io/sstable/KeyIterator.java
index dd08421..7de27af 100644
--- a/src/java/org/apache/cassandra/io/sstable/KeyIterator.java
+++ b/src/java/org/apache/cassandra/io/sstable/KeyIterator.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io.sstable;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io.sstable;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/ReducingKeyIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/ReducingKeyIterator.java b/src/java/org/apache/cassandra/io/sstable/ReducingKeyIterator.java
index aa2618d..5c792d2 100644
--- a/src/java/org/apache/cassandra/io/sstable/ReducingKeyIterator.java
+++ b/src/java/org/apache/cassandra/io/sstable/ReducingKeyIterator.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io.sstable;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io.sstable;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/SSTable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTable.java b/src/java/org/apache/cassandra/io/sstable/SSTable.java
index ff0ea6f..31f961f 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTable.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTable.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
index 3355fca..fbb0788 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io.sstable;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io.sstable;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
index 4e52993..13fb8f2 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
@@ -121,13 +121,13 @@ public class SSTableMetadata
/**
* Ratio is compressed/uncompressed and it is
- * if you have 1.x then compression isn't helping
+ * if you have 1.x then compression isn't helping
*/
public void addCompressionRatio(long compressed, long uncompressed)
{
compressionRatio = (double) compressed/uncompressed;
}
-
+
public void updateMaxTimestamp(long potentialMax)
{
maxTimestamp = Math.max(maxTimestamp, potentialMax);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
index 53980ed..25c158c 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -103,7 +103,7 @@ public class SSTableWriter extends SSTable
this.sstableMetadataCollector = sstableMetadataCollector;
}
-
+
public void mark()
{
dataMark = dataFile.mark();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/util/BufferedSegmentedFile.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/util/BufferedSegmentedFile.java b/src/java/org/apache/cassandra/io/util/BufferedSegmentedFile.java
index 31b4a6c..7e4442f 100644
--- a/src/java/org/apache/cassandra/io/util/BufferedSegmentedFile.java
+++ b/src/java/org/apache/cassandra/io/util/BufferedSegmentedFile.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io.util;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io.util;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/util/ColumnSortedMap.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/util/ColumnSortedMap.java b/src/java/org/apache/cassandra/io/util/ColumnSortedMap.java
index a8104bc..d71556c 100644
--- a/src/java/org/apache/cassandra/io/util/ColumnSortedMap.java
+++ b/src/java/org/apache/cassandra/io/util/ColumnSortedMap.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.io.util;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.io.util;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/io/util/DataOutputBuffer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/util/DataOutputBuffer.java b/src/java/org/apache/cassandra/io/util/DataOutputBuffer.java
index bd988c1..6248657 100644
--- a/src/java/org/apache/cassandra/io/util/DataOutputBuffer.java
+++ b/src/java/org/apache/cassandra/io/util/DataOutputBuffer.java
@@ -31,12 +31,12 @@ public final class DataOutputBuffer extends DataOutputStream
{
this(128);
}
-
+
public DataOutputBuffer(int size)
{
super(new OutputBuffer(size));
}
-
+
private OutputBuffer buffer()
{
return (OutputBuffer)out;
@@ -50,13 +50,13 @@ public final class DataOutputBuffer extends DataOutputStream
{
return buffer().getData();
}
-
+
/** Returns the length of the valid data currently in the buffer. */
public int getLength()
{
return buffer().getLength();
}
-
+
/** Resets the buffer to empty. */
public DataOutputBuffer reset()
{