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:30:43 UTC
[9/12] [3649] Strip end of line whitespaces
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java b/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
index 50453a0..a3f6825 100644
--- a/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
+++ b/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
@@ -3,7 +3,7 @@
*/
package org.apache.cassandra.service;
/*
- *
+ *
* 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
@@ -11,16 +11,16 @@ package org.apache.cassandra.service;
* 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/service/DatacenterWriteResponseHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java b/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java
index 7ca3dd1..62385db 100644
--- a/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java
+++ b/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java
@@ -3,7 +3,7 @@
*/
package org.apache.cassandra.service;
/*
- *
+ *
* 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
@@ -11,16 +11,16 @@ package org.apache.cassandra.service;
* 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.
- *
+ *
*/
@@ -78,7 +78,7 @@ public class DatacenterWriteResponseHandler extends WriteResponseHandler
condition.signal();
}
}
-
+
@Override
public void assureSufficientLiveNodes() throws UnavailableException
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java b/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java
index 59a2ffe..78cdd01 100644
--- a/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java
+++ b/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.service;
/*
- *
+ *
* 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.service;
* 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/service/GCInspector.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/GCInspector.java b/src/java/org/apache/cassandra/service/GCInspector.java
index 94da3c9..32c2342 100644
--- a/src/java/org/apache/cassandra/service/GCInspector.java
+++ b/src/java/org/apache/cassandra/service/GCInspector.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.service;
/*
- *
+ *
* 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.service;
* 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.lang.management.GarbageCollectorMXBean;
@@ -44,7 +44,7 @@ public class GCInspector
final static long INTERVAL_IN_MS = 1000;
final static long MIN_DURATION = 200;
final static long MIN_DURATION_TPSTATS = 1000;
-
+
public static final GCInspector instance = new GCInspector();
private HashMap<String, Long> gctimes = new HashMap<String, Long>();
@@ -77,7 +77,7 @@ public class GCInspector
{
// don't bother starting a thread that will do nothing.
if (beans.size() == 0)
- return;
+ return;
Runnable t = new Runnable()
{
public void run()
@@ -103,12 +103,12 @@ public class GCInspector
Long previousCount = gccounts.get(gc.getName());
Long count = gc.getCollectionCount();
-
+
if (previousCount == null)
- previousCount = 0L;
+ previousCount = 0L;
if (count.equals(previousCount))
continue;
-
+
gccounts.put(gc.getName(), count);
MemoryUsage mu = membean.getHeapMemoryUsage();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/service/IReadCommand.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/IReadCommand.java b/src/java/org/apache/cassandra/service/IReadCommand.java
index 0a8bd4d..ccc8b28 100644
--- a/src/java/org/apache/cassandra/service/IReadCommand.java
+++ b/src/java/org/apache/cassandra/service/IReadCommand.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.service;
/*
- *
+ *
* 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.service;
* 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/service/RepairCallback.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/RepairCallback.java b/src/java/org/apache/cassandra/service/RepairCallback.java
index 264881a..ee123e1 100644
--- a/src/java/org/apache/cassandra/service/RepairCallback.java
+++ b/src/java/org/apache/cassandra/service/RepairCallback.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.service;
/*
- *
+ *
* 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.service;
* 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/service/SocketSessionManagementService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/SocketSessionManagementService.java b/src/java/org/apache/cassandra/service/SocketSessionManagementService.java
index daebf2e..02147a8 100644
--- a/src/java/org/apache/cassandra/service/SocketSessionManagementService.java
+++ b/src/java/org/apache/cassandra/service/SocketSessionManagementService.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.service;
/*
- *
+ *
* 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.service;
* 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/service/StorageProxy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java
index 72cdd1b..8ae8ff8 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -133,7 +133,7 @@ public class StorageProxy implements StorageProxyMBean
Collection<InetAddress> targets,
IWriteResponseHandler responseHandler,
String localDataCenter,
- ConsistencyLevel consistency_level)
+ ConsistencyLevel consistency_level)
throws IOException
{
if (logger.isDebugEnabled())
@@ -271,14 +271,14 @@ public class StorageProxy implements StorageProxyMBean
* Note about hints:
*
* | Hinted Handoff | Consist. Level |
- * | on | >=1 | --> wait for hints. We DO NOT notify the handler with handler.response() for hints;
+ * | on | >=1 | --> wait for hints. We DO NOT notify the handler with handler.response() for hints;
* | on | ANY | --> wait for hints. Responses count towards consistency.
* | off | >=1 | --> DO NOT fire hints. And DO NOT wait for them to complete.
* | off | ANY | --> DO NOT fire hints. And DO NOT wait for them to complete.
*
- * @throws TimeoutException if the hints cannot be written/enqueued
+ * @throws TimeoutException if the hints cannot be written/enqueued
*/
- public static void sendToHintedEndpoints(final RowMutation rm,
+ public static void sendToHintedEndpoints(final RowMutation rm,
Collection<InetAddress> targets,
IWriteResponseHandler responseHandler,
String localDataCenter,
@@ -545,7 +545,7 @@ public class StorageProxy implements StorageProxyMBean
return performWrite(cm, cm.consistency(), localDataCenter, counterWriteOnCoordinatorPerformer);
}
- private static Runnable counterWriteTask(final IMutation mutation,
+ private static Runnable counterWriteTask(final IMutation mutation,
final Collection<InetAddress> targets,
final IWriteResponseHandler responseHandler,
final String localDataCenter,
@@ -947,8 +947,8 @@ public class StorageProxy implements StorageProxyMBean
for (InetAddress endpoint : liveHosts)
{
Message message = new Message(FBUtilities.getBroadcastAddress(),
- StorageService.Verb.SCHEMA_CHECK,
- ArrayUtils.EMPTY_BYTE_ARRAY,
+ StorageService.Verb.SCHEMA_CHECK,
+ ArrayUtils.EMPTY_BYTE_ARRAY,
Gossiper.instance.getVersion(endpoint));
MessagingService.instance().sendRR(message, endpoint, cb);
}
@@ -1148,7 +1148,7 @@ public class StorageProxy implements StorageProxyMBean
{
if (!hintedHandoffEnabled)
return false;
-
+
boolean hintWindowExpired = Gossiper.instance.getEndpointDowntime(ep) > maxHintWindow;
if (hintWindowExpired)
logger.debug("not hinting {} which has been down {}ms", ep, Gossiper.instance.getEndpointDowntime(ep));
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 91ea705..4d49531 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -947,7 +947,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
return Lists.newArrayList();
}
});
-
+
List<Range<Token>> ranges = getAllRanges(tokenMetadata_.sortedTokens());
for (Range<Token> range : ranges)
{
@@ -2638,20 +2638,20 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
}
public Map<String, Float> effectiveOwnership(String keyspace) throws ConfigurationException
- {
+ {
Map<String, Float> effective = Maps.newHashMap();
if (Schema.instance.getNonSystemTables().size() <= 0)
throw new ConfigurationException("Couldn't find any Non System Keyspaces to infer replication topology");
if (keyspace == null && !hasSameReplication(Schema.instance.getNonSystemTables()))
throw new ConfigurationException("Non System keyspaces doesnt have the same topology");
-
+
if (keyspace == null)
keyspace = Schema.instance.getNonSystemTables().get(0);
-
+
List<Token> sortedTokens = new ArrayList<Token>(tokenMetadata_.getTokenToEndpointMapForReading().keySet());
Collections.sort(sortedTokens);
Map<Token, Float> ownership = getPartitioner().describeOwnership(sortedTokens);
-
+
for (Entry<InetAddress, Collection<Range<Token>>> ranges : constructEndpointToRangeMap(keyspace).entrySet())
{
Token token = tokenMetadata_.getToken(ranges.getKey());
@@ -2663,7 +2663,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
}
return effective;
}
-
+
private boolean hasSameReplication(List<String> list)
{
if (list.isEmpty())
@@ -2672,8 +2672,8 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
{
KSMetaData ksm1 = Schema.instance.getKSMetaData(Schema.instance.getNonSystemTables().get(i));
KSMetaData ksm2 = Schema.instance.getKSMetaData(Schema.instance.getNonSystemTables().get(i + 1));
- if (!ksm1.strategyClass.equals(ksm2.strategyClass) ||
- !Iterators.elementsEqual(ksm1.strategyOptions.entrySet().iterator(),
+ if (!ksm1.strategyClass.equals(ksm2.strategyClass) ||
+ !Iterators.elementsEqual(ksm1.strategyOptions.entrySet().iterator(),
ksm2.strategyOptions.entrySet().iterator()))
return false;
}
@@ -2755,7 +2755,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
latch.countDown();
continue;
}
-
+
final String table = entry.getKey();
final Set<Map.Entry<Range<Token>, InetAddress>> pending = new HashSet<Map.Entry<Range<Token>, InetAddress>>(rangesWithEndpoints.entries());
@@ -2968,7 +2968,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
sampledKeys.add(key.getToken().toString());
return sampledKeys;
}
-
+
public void rebuildSecondaryIndex(String ksName, String cfName, String... idxNames)
{
ColumnFamilyStore.rebuildSecondaryIndex(ksName, cfName, idxNames);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/service/StorageServiceMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index a3cbc7b..afff793 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -300,7 +300,7 @@ public interface StorageServiceMBean
public Map<String, Float> getOwnership();
/**
- * Effective ownership is % of the data each node owns given the keyspace
+ * Effective ownership is % of the data each node owns given the keyspace
* we calculate the percentage using replication factor.
* If Keyspace == null, this method will try to verify if all the keyspaces
* in the cluster have the same replication strategies and if yes then we will
@@ -344,7 +344,7 @@ public interface StorageServiceMBean
public boolean isJoined();
public int getExceptionCount();
-
+
public void setStreamThroughputMbPerSec(int value);
public int getStreamThroughputMbPerSec();
@@ -378,7 +378,7 @@ public interface StorageServiceMBean
/**
* Return a List of Tokens representing a sample of keys
* across all ColumnFamilyStores
- *
+ *
* @return set of Tokens as Strings
*/
public List<String> getRangeKeySample();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/FileStreamTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/FileStreamTask.java b/src/java/org/apache/cassandra/streaming/FileStreamTask.java
index 948bea7..7c84c03 100644
--- a/src/java/org/apache/cassandra/streaming/FileStreamTask.java
+++ b/src/java/org/apache/cassandra/streaming/FileStreamTask.java
@@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory;
public class FileStreamTask extends WrappedRunnable
{
private static Logger logger = LoggerFactory.getLogger(FileStreamTask.class);
-
+
public static final int CHUNK_SIZE = 64 * 1024;
// around 10 minutes at the default rpctimeout
public static final int MAX_CONNECT_ATTEMPTS = 8;
@@ -85,7 +85,7 @@ public class FileStreamTask extends WrappedRunnable
}
});
}
-
+
public void runMayThrow() throws IOException
{
try
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/PendingFile.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/PendingFile.java b/src/java/org/apache/cassandra/streaming/PendingFile.java
index 50e0921..5701ae8 100644
--- a/src/java/org/apache/cassandra/streaming/PendingFile.java
+++ b/src/java/org/apache/cassandra/streaming/PendingFile.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.streaming;
/*
- *
+ *
* 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.streaming;
* 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.
- *
+ *
*/
@@ -63,7 +63,7 @@ public class PendingFile
{
this(sstable, desc, component, sections, type, 0);
}
-
+
public PendingFile(SSTableReader sstable, Descriptor desc, String component, List<Pair<Long,Long>> sections, OperationType type, long estimatedKeys)
{
this.sstable = sstable;
@@ -86,7 +86,7 @@ public class PendingFile
{
return desc.filenameFor(component);
}
-
+
public boolean equals(Object o)
{
if ( !(o instanceof PendingFile) )
@@ -134,14 +134,14 @@ public class PendingFile
String filename = dis.readUTF();
if (filename.isEmpty())
return null;
-
+
Descriptor desc = Descriptor.fromFilename(filename);
String component = dis.readUTF();
int count = dis.readInt();
List<Pair<Long,Long>> sections = new ArrayList<Pair<Long,Long>>(count);
for (int i = 0; i < count; i++)
sections.add(new Pair<Long,Long>(Long.valueOf(dis.readLong()), Long.valueOf(dis.readLong())));
- // this controls the way indexes are rebuilt when streaming in.
+ // this controls the way indexes are rebuilt when streaming in.
OperationType type = OperationType.RESTORE_REPLICA_COUNT;
if (version > MessagingService.VERSION_07)
type = OperationType.valueOf(dis.readUTF());
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/ReplicationFinishedVerbHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/ReplicationFinishedVerbHandler.java b/src/java/org/apache/cassandra/streaming/ReplicationFinishedVerbHandler.java
index 4fe7845..b161f34 100644
--- a/src/java/org/apache/cassandra/streaming/ReplicationFinishedVerbHandler.java
+++ b/src/java/org/apache/cassandra/streaming/ReplicationFinishedVerbHandler.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.streaming;
/*
- *
+ *
* 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.streaming;
* 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 org.apache.commons.lang.ArrayUtils;
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/StreamHeader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamHeader.java b/src/java/org/apache/cassandra/streaming/StreamHeader.java
index 97161e8..793e19e 100644
--- a/src/java/org/apache/cassandra/streaming/StreamHeader.java
+++ b/src/java/org/apache/cassandra/streaming/StreamHeader.java
@@ -70,7 +70,7 @@ public class StreamHeader
{
this(table, sessionId, first, pendingFiles, FBUtilities.getBroadcastAddress());
}
-
+
public StreamHeader(String table, long sessionId, PendingFile first, Collection<PendingFile> pendingFiles, InetAddress broadcastAddress)
{
this.table = table;
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/StreamIn.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamIn.java b/src/java/org/apache/cassandra/streaming/StreamIn.java
index 75a23a2..93bdc08 100644
--- a/src/java/org/apache/cassandra/streaming/StreamIn.java
+++ b/src/java/org/apache/cassandra/streaming/StreamIn.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.streaming;
/*
- *
+ *
* 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.streaming;
* 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/streaming/StreamOut.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamOut.java b/src/java/org/apache/cassandra/streaming/StreamOut.java
index 517bc0e..710c9ed 100644
--- a/src/java/org/apache/cassandra/streaming/StreamOut.java
+++ b/src/java/org/apache/cassandra/streaming/StreamOut.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/streaming/StreamOutSession.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamOutSession.java b/src/java/org/apache/cassandra/streaming/StreamOutSession.java
index ea5ccda..80629b8 100644
--- a/src/java/org/apache/cassandra/streaming/StreamOutSession.java
+++ b/src/java/org/apache/cassandra/streaming/StreamOutSession.java
@@ -93,7 +93,7 @@ public class StreamOutSession implements IEndpointStateChangeSubscriber, IFailur
{
return context.right;
}
-
+
public void addFilesToStream(List<PendingFile> pendingFiles)
{
for (PendingFile pendingFile : pendingFiles)
@@ -103,7 +103,7 @@ public class StreamOutSession implements IEndpointStateChangeSubscriber, IFailur
files.put(pendingFile.getFilename(), pendingFile);
}
}
-
+
public void retry()
{
streamFile(files.get(currentFile));
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/StreamReply.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamReply.java b/src/java/org/apache/cassandra/streaming/StreamReply.java
index 6ba79b3..f97cfee 100644
--- a/src/java/org/apache/cassandra/streaming/StreamReply.java
+++ b/src/java/org/apache/cassandra/streaming/StreamReply.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.streaming;
/*
- *
+ *
* 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.streaming;
* 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/streaming/StreamRequestMessage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java b/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java
index c5179ba..27f7b6c 100644
--- a/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java
+++ b/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.streaming;
/*
- *
+ *
* 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.streaming;
* 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.
- *
+ *
*/
@@ -45,7 +45,7 @@ import org.apache.cassandra.utils.FBUtilities;
* This class encapsulates the message that needs to be sent to nodes
* that handoff data. The message contains information about ranges
* that need to be transferred and the target node.
-*
+*
* If a file is specified, ranges and table will not. vice-versa should hold as well.
*/
class StreamRequestMessage implements MessageProducer
@@ -63,10 +63,10 @@ class StreamRequestMessage implements MessageProducer
protected final long sessionId;
protected final InetAddress target;
-
+
// if this is specified, ranges and table should not be.
protected final PendingFile file;
-
+
// if these are specified, file shoud not be.
protected final Collection<Range<Token>> ranges;
protected final String table;
@@ -94,7 +94,7 @@ class StreamRequestMessage implements MessageProducer
table = null;
columnFamilies = null;
}
-
+
public Message getMessage(Integer version)
{
FastByteArrayOutputStream bos = new FastByteArrayOutputStream();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/StreamRequestVerbHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamRequestVerbHandler.java b/src/java/org/apache/cassandra/streaming/StreamRequestVerbHandler.java
index b2b6f28..a328be1 100644
--- a/src/java/org/apache/cassandra/streaming/StreamRequestVerbHandler.java
+++ b/src/java/org/apache/cassandra/streaming/StreamRequestVerbHandler.java
@@ -36,7 +36,7 @@ import org.apache.cassandra.net.Message;
public class StreamRequestVerbHandler implements IVerbHandler
{
private static Logger logger = LoggerFactory.getLogger(StreamRequestVerbHandler.class);
-
+
public void doVerb(Message message, String id)
{
if (logger.isDebugEnabled())
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/StreamingService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamingService.java b/src/java/org/apache/cassandra/streaming/StreamingService.java
index 403958e..497fa62 100644
--- a/src/java/org/apache/cassandra/streaming/StreamingService.java
+++ b/src/java/org/apache/cassandra/streaming/StreamingService.java
@@ -86,7 +86,7 @@ public class StreamingService implements StreamingServiceMBean
InetAddress dest = InetAddress.getByName(host);
if (!existingDestinations.contains(dest))
return files;
-
+
for (PendingFile f : StreamOutSession.getOutgoingFiles(dest))
files.add(String.format("%s", f.toString()));
return files;
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/streaming/StreamingServiceMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamingServiceMBean.java b/src/java/org/apache/cassandra/streaming/StreamingServiceMBean.java
index 1ea82e0..6610193 100644
--- a/src/java/org/apache/cassandra/streaming/StreamingServiceMBean.java
+++ b/src/java/org/apache/cassandra/streaming/StreamingServiceMBean.java
@@ -36,7 +36,7 @@ public interface StreamingServiceMBean
/** details about incoming streams */
public List<String> getIncomingFiles(String host) throws IOException;
-
+
/** What's currently happening wrt streaming. */
public String getStatus();
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/thrift/CassandraDaemon.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CassandraDaemon.java b/src/java/org/apache/cassandra/thrift/CassandraDaemon.java
index e05389b..52473a6 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraDaemon.java
@@ -45,10 +45,10 @@ import org.apache.thrift.transport.TTransportException;
import org.apache.thrift.transport.TTransportFactory;
/**
- * This class supports two methods for creating a Cassandra node daemon,
- * invoking the class's main method, and using the jsvc wrapper from
- * commons-daemon, (for more information on using this class with the
- * jsvc wrapper, see the
+ * This class supports two methods for creating a Cassandra node daemon,
+ * invoking the class's main method, and using the jsvc wrapper from
+ * commons-daemon, (for more information on using this class with the
+ * jsvc wrapper, see the
* <a href="http://commons.apache.org/daemon/jsvc.html">Commons Daemon</a>
* documentation).
*/
@@ -132,17 +132,17 @@ public class CassandraDaemon extends org.apache.cassandra.service.AbstractCassan
TTransportFactory inTransportFactory = new TFramedTransport.Factory(tFramedTransportSize);
TTransportFactory outTransportFactory = new TFramedTransport.Factory(tFramedTransportSize);
logger.info("Using TFastFramedTransport with a max frame size of {} bytes.", tFramedTransportSize);
-
+
if (DatabaseDescriptor.getRpcServerType().equalsIgnoreCase(SYNC))
- {
+ {
TServerTransport serverTransport;
try
{
- serverTransport = new TCustomServerSocket(new InetSocketAddress(listenAddr, listenPort),
- DatabaseDescriptor.getRpcKeepAlive(),
+ serverTransport = new TCustomServerSocket(new InetSocketAddress(listenAddr, listenPort),
+ DatabaseDescriptor.getRpcKeepAlive(),
DatabaseDescriptor.getRpcSendBufferSize(),
DatabaseDescriptor.getRpcRecvBufferSize());
- }
+ }
catch (TTransportException e)
{
throw new RuntimeException(String.format("Unable to create thrift socket to %s:%s", listenAddr, listenPort), e);
@@ -166,10 +166,10 @@ public class CassandraDaemon extends org.apache.cassandra.service.AbstractCassan
try
{
serverTransport = new TCustomNonblockingServerSocket(new InetSocketAddress(listenAddr, listenPort),
- DatabaseDescriptor.getRpcKeepAlive(),
+ DatabaseDescriptor.getRpcKeepAlive(),
DatabaseDescriptor.getRpcSendBufferSize(),
DatabaseDescriptor.getRpcRecvBufferSize());
- }
+ }
catch (TTransportException e)
{
throw new RuntimeException(String.format("Unable to create thrift socket to %s:%s", listenAddr, listenPort), e);
@@ -186,15 +186,15 @@ public class CassandraDaemon extends org.apache.cassandra.service.AbstractCassan
.processor(processor);
logger.info(String.format("Using non-blocking/asynchronous thrift server on %s : %s", listenAddr, listenPort));
serverEngine = new CustomTNonBlockingServer(serverArgs);
- }
+ }
else if (DatabaseDescriptor.getRpcServerType().equalsIgnoreCase(HSHA))
{
// This is NIO selector service but the invocation will be Multi-Threaded with the Executor service.
ExecutorService executorService = new JMXEnabledThreadPoolExecutor(DatabaseDescriptor.getRpcMinThreads(),
DatabaseDescriptor.getRpcMaxThreads(),
- 60L,
+ 60L,
TimeUnit.SECONDS,
- new SynchronousQueue<Runnable>(),
+ new SynchronousQueue<Runnable>(),
new NamedThreadFactory("RPC-Thread"), "RPC-THREAD-POOL");
TNonblockingServer.Args serverArgs = new TNonblockingServer.Args(serverTransport).inputTransportFactory(inTransportFactory)
.outputTransportFactory(outTransportFactory)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/thrift/CassandraServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index 2503315..952a103 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -62,7 +62,7 @@ import org.apache.thrift.TException;
public class CassandraServer implements Cassandra.Iface
{
private static Logger logger = LoggerFactory.getLogger(CassandraServer.class);
-
+
private final static int COUNT_PAGE_SIZE = 1024;
private final static List<ColumnOrSuperColumn> EMPTY_COLUMNS = Collections.emptyList();
@@ -88,7 +88,7 @@ public class CassandraServer implements Cassandra.Iface
{
requestScheduler = DatabaseDescriptor.getRequestScheduler();
}
-
+
public ClientState state()
{
SocketAddress remoteSocket = SocketSessionManagementService.remoteSocket.get();
@@ -123,7 +123,7 @@ public class CassandraServer implements Cassandra.Iface
release();
}
}
- catch (TimeoutException e)
+ catch (TimeoutException e)
{
logger.debug("... timed out");
throw new TimedOutException();
@@ -312,12 +312,12 @@ public class CassandraServer implements Cassandra.Iface
throws InvalidRequestException, UnavailableException, TimedOutException
{
logger.debug("get_slice");
-
+
ClientState cState = state();
cState.hasColumnFamilyAccess(column_parent.column_family, Permission.READ);
return multigetSliceInternal(cState.getKeyspace(), Collections.singletonList(key), column_parent, predicate, consistency_level).get(key);
}
-
+
public Map<ByteBuffer, List<ColumnOrSuperColumn>> multiget_slice(List<ByteBuffer> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
throws InvalidRequestException, UnavailableException, TimedOutException
{
@@ -612,7 +612,7 @@ public class CassandraServer implements Cassandra.Iface
ThriftValidation.validateCommutativeForWrite(metadata, consistency_level);
RowMutation rm = new RowMutation(cState.getKeyspace(), key);
- rm.delete(new QueryPath(column_path), timestamp);
+ rm.delete(new QueryPath(column_path), timestamp);
if (isCommutativeOp)
doInsert(consistency_level, Arrays.asList(new CounterMutation(rm, consistency_level)));
@@ -910,8 +910,8 @@ public class CassandraServer implements Cassandra.Iface
{
requestScheduler.release();
}
-
- // helper method to apply migration on the migration stage. typical migration failures will throw an
+
+ // helper method to apply migration on the migration stage. typical migration failures will throw an
// InvalidRequestException. atypical failures will throw a RuntimeException.
private static void applyMigrationOnStage(final Migration m)
{
@@ -953,11 +953,11 @@ public class CassandraServer implements Cassandra.Iface
throws InvalidRequestException, SchemaDisagreementException, TException
{
logger.debug("drop_column_family");
-
+
ClientState cState = state();
cState.hasColumnFamilySchemaAccess(Permission.WRITE);
validateSchemaAgreement();
-
+
try
{
applyMigrationOnStage(new DropColumnFamily(cState.getKeyspace(), column_family));
@@ -981,7 +981,7 @@ public class CassandraServer implements Cassandra.Iface
ThriftValidation.validateKeyspaceNotYetExisting(ks_def.name);
// generate a meaningful error if the user setup keyspace and/or column definition incorrectly
- for (CfDef cf : ks_def.cf_defs)
+ for (CfDef cf : ks_def.cf_defs)
{
if (!cf.getKeyspace().equals(ks_def.getName()))
{
@@ -1019,7 +1019,7 @@ public class CassandraServer implements Cassandra.Iface
ThriftValidation.validateKeyspaceNotSystem(keyspace);
state().hasKeyspaceSchemaAccess(Permission.WRITE);
validateSchemaAgreement();
-
+
try
{
applyMigrationOnStage(new DropKeyspace(keyspace));
@@ -1033,7 +1033,7 @@ public class CassandraServer implements Cassandra.Iface
}
}
- /** update an existing keyspace, but do not allow column family modifications.
+ /** update an existing keyspace, but do not allow column family modifications.
* @throws SchemaDisagreementException
*/
public synchronized String system_update_keyspace(KsDef ks_def)
@@ -1137,7 +1137,7 @@ public class CassandraServer implements Cassandra.Iface
public Map<String, List<String>> describe_schema_versions() throws TException, InvalidRequestException
{
- logger.debug("checking schema agreement");
+ logger.debug("checking schema agreement");
return StorageProxy.describeSchemaVersions();
}
@@ -1182,11 +1182,11 @@ public class CassandraServer implements Cassandra.Iface
internal_remove(key, path, System.currentTimeMillis(), consistency_level, true);
}
-
+
private static String uncompress(ByteBuffer query, Compression compression) throws InvalidRequestException
{
String queryString = null;
-
+
// Decompress the query string.
try
{
@@ -1195,9 +1195,9 @@ public class CassandraServer implements Cassandra.Iface
case GZIP:
FastByteArrayOutputStream byteArray = new FastByteArrayOutputStream();
byte[] outBuffer = new byte[1024], inBuffer = new byte[1024];
-
+
Inflater decompressor = new Inflater();
-
+
int lenRead = 0;
while (true)
{
@@ -1205,25 +1205,25 @@ public class CassandraServer implements Cassandra.Iface
lenRead = query.remaining() < 1024 ? query.remaining() : 1024;
query.get(inBuffer, 0, lenRead);
decompressor.setInput(inBuffer, 0, lenRead);
-
+
int lenWrite = 0;
while ((lenWrite = decompressor.inflate(outBuffer)) !=0)
byteArray.write(outBuffer, 0, lenWrite);
-
+
if (decompressor.finished())
break;
}
-
+
decompressor.end();
-
+
queryString = new String(byteArray.toByteArray(), 0, byteArray.size(), "UTF-8");
break;
case NONE:
- try
+ try
{
queryString = ByteBufferUtil.string(query);
}
- catch (CharacterCodingException ex)
+ catch (CharacterCodingException ex)
{
throw new InvalidRequestException(ex.getMessage());
}
@@ -1245,9 +1245,9 @@ public class CassandraServer implements Cassandra.Iface
throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException
{
if (logger.isDebugEnabled()) logger.debug("execute_cql_query");
-
+
String queryString = uncompress(query,compression);
-
+
try
{
ClientState cState = state();
@@ -1268,9 +1268,9 @@ public class CassandraServer implements Cassandra.Iface
throws InvalidRequestException, TException
{
if (logger.isDebugEnabled()) logger.debug("prepare_cql_query");
-
+
String queryString = uncompress(query,compression);
-
+
try
{
ClientState cState = state();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java b/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
index 9bfb4f7..9f7b0cf 100644
--- a/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
+++ b/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.thrift;
/*
- *
+ *
* 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.thrift;
* 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.
- *
+ *
*/
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
/**
* This is a interim solution till THRIFT-1167 gets committed...
- *
+ *
* The idea here is to avoid sticking to one CPU for IO's. For better throughput
* it is spread across multiple threads. Number of selector thread can be the
* number of CPU available.
@@ -125,7 +125,7 @@ public class CustomTHsHaServer extends TNonblockingServer
// wait till all done with stuff's
for (SelectorThread thread : ioThreads)
thread.join();
- }
+ }
catch (InterruptedException e)
{
LOGGER.error("Interrupted while joining threads!", e);
@@ -162,7 +162,7 @@ public class CustomTHsHaServer extends TNonblockingServer
this.selector = SelectorProvider.provider().openSelector();
this.serverTransport = (TNonblockingServerTransport) serverTransport_;
this.serverTransport.registerSelector(selector);
- }
+ }
catch (IOException ex)
{
throw new RuntimeException("Couldnt open the NIO selector", ex);
@@ -185,7 +185,7 @@ public class CustomTHsHaServer extends TNonblockingServer
{
// ignore this exception.
}
- }
+ }
catch (Throwable t)
{
LOGGER.error("Uncaught Exception: ", t);
@@ -220,7 +220,7 @@ public class CustomTHsHaServer extends TNonblockingServer
// process the changes which are inserted after completion.
processInterestChanges();
}
-
+
private void handleAccept()
{
SelectionKey clientKey = null;
@@ -232,7 +232,7 @@ public class CustomTHsHaServer extends TNonblockingServer
clientKey = client.registerSelector(selector, SelectionKey.OP_READ);
// add this key to the map
FrameBuffer frameBuffer = new FrameBuffer(client, clientKey);
- clientKey.attach(frameBuffer);
+ clientKey.attach(frameBuffer);
} catch (TTransportException ex)
{
// ignore this might have been handled by the other threads.
@@ -250,7 +250,7 @@ public class CustomTHsHaServer extends TNonblockingServer
client.close();
}
}
-
+
private void handleRead(SelectionKey key)
{
FrameBuffer buffer = (FrameBuffer) key.attachment();
@@ -266,14 +266,14 @@ public class CustomTHsHaServer extends TNonblockingServer
cleanupSelectionkey(key);
}
}
-
+
private void handleWrite(SelectionKey key)
{
FrameBuffer buffer = (FrameBuffer) key.attachment();
if (!buffer.write())
cleanupSelectionkey(key);
}
-
+
public void requestSelectInterestChange(FrameBuffer frameBuffer)
{
synchronized (selectInterestChanges)
@@ -293,7 +293,7 @@ public class CustomTHsHaServer extends TNonblockingServer
selectInterestChanges.clear();
}
}
-
+
private void cleanupSelectionkey(SelectionKey key)
{
FrameBuffer buffer = (FrameBuffer) key.attachment();
@@ -302,13 +302,13 @@ public class CustomTHsHaServer extends TNonblockingServer
// cancel the selection key
key.cancel();
}
-
+
public void wakeupSelector()
{
selector.wakeup();
}
}
-
+
protected boolean requestInvoke(FrameBuffer frameBuffer, SelectorThread thread)
{
try
@@ -316,7 +316,7 @@ public class CustomTHsHaServer extends TNonblockingServer
Runnable invocation = new Invocation(frameBuffer, thread);
invoker.execute(invocation);
return true;
- }
+ }
catch (RejectedExecutionException rx)
{
LOGGER.warn("ExecutorService rejected execution!", rx);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/thrift/CustomTNonBlockingServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CustomTNonBlockingServer.java b/src/java/org/apache/cassandra/thrift/CustomTNonBlockingServer.java
index b25fc0d..0b6c90b 100644
--- a/src/java/org/apache/cassandra/thrift/CustomTNonBlockingServer.java
+++ b/src/java/org/apache/cassandra/thrift/CustomTNonBlockingServer.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.thrift;
/*
- *
+ *
* 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.thrift;
* 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/thrift/CustomTThreadPoolServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java b/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java
index 161ff12..81377f7 100644
--- a/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java
+++ b/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java
@@ -60,14 +60,14 @@ public class CustomTThreadPoolServer extends TServer
//Track and Limit the number of connected clients
private final AtomicInteger activeClients = new AtomicInteger(0);
-
-
+
+
public CustomTThreadPoolServer(TThreadPoolServer.Args args, ExecutorService executorService) {
super(args);
executorService_ = executorService;
this.args = args;
}
-
+
public void serve()
{
try
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/thrift/RequestType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/RequestType.java b/src/java/org/apache/cassandra/thrift/RequestType.java
index fc09642..620cfdd 100644
--- a/src/java/org/apache/cassandra/thrift/RequestType.java
+++ b/src/java/org/apache/cassandra/thrift/RequestType.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.thrift;
/*
- *
+ *
* 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.thrift;
* 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/thrift/TCustomNonblockingServerSocket.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/TCustomNonblockingServerSocket.java b/src/java/org/apache/cassandra/thrift/TCustomNonblockingServerSocket.java
index 081c221..04cb3ad 100644
--- a/src/java/org/apache/cassandra/thrift/TCustomNonblockingServerSocket.java
+++ b/src/java/org/apache/cassandra/thrift/TCustomNonblockingServerSocket.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.thrift;
/*
- *
+ *
* 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.thrift;
* 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.
- *
+ *
*/
@@ -63,7 +63,7 @@ public class TCustomNonblockingServerSocket extends TNonblockingServerSocket
{
logger.warn("Failed to set keep-alive on Thrift socket.", se);
}
-
+
if (this.sendBufferSize != null)
{
try
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java b/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java
index 3be5e56..e139190 100644
--- a/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java
+++ b/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java
@@ -1,7 +1,7 @@
package org.apache.cassandra.thrift;
/*
- *
+ *
* 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.thrift;
* 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;
@@ -54,7 +54,7 @@ public class TCustomServerSocket extends TServerTransport
/**
* Allows fine-tuning of the server socket including keep-alive, reuse of addresses, send and receive buffer sizes.
- *
+ *
* @param bindAddr
* @param keepAlive
* @param sendBufferSize
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/thrift/TCustomSocket.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/TCustomSocket.java b/src/java/org/apache/cassandra/thrift/TCustomSocket.java
index 90e5713..edae2cc 100644
--- a/src/java/org/apache/cassandra/thrift/TCustomSocket.java
+++ b/src/java/org/apache/cassandra/thrift/TCustomSocket.java
@@ -18,7 +18,7 @@
*/
package org.apache.cassandra.thrift;
-
+
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
@@ -30,37 +30,37 @@ import org.apache.thrift.transport.TIOStreamTransport;
import org.apache.thrift.transport.TTransportException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
+
/**
- * Socket implementation of the TTransport interface.
- *
+ * Socket implementation of the TTransport interface.
+ *
* Adds socket buffering
*
*/
public class TCustomSocket extends TIOStreamTransport {
-
+
private static final Logger LOGGER = LoggerFactory.getLogger(TCustomSocket.class.getName());
-
+
/**
* Wrapped Socket object
*/
private Socket socket_ = null;
-
+
/**
* Remote host
*/
private String host_ = null;
-
+
/**
* Remote port
*/
private int port_ = 0;
-
+
/**
* Socket timeout
*/
private int timeout_ = 0;
-
+
/**
* Constructor that takes an already created socket.
*
@@ -75,7 +75,7 @@ public class TCustomSocket extends TIOStreamTransport {
} catch (SocketException sx) {
LOGGER.warn("Could not configure socket.", sx);
}
-
+
if (isOpen()) {
try {
inputStream_ = new BufferedInputStream(socket_.getInputStream(), 1024);
@@ -86,7 +86,7 @@ public class TCustomSocket extends TIOStreamTransport {
}
}
}
-
+
/**
* Creates a new unconnected socket that will connect to the given host
* on the given port.
@@ -97,7 +97,7 @@ public class TCustomSocket extends TIOStreamTransport {
public TCustomSocket(String host, int port) {
this(host, port, 0);
}
-
+
/**
* Creates a new unconnected socket that will connect to the given host
* on the given port.
@@ -112,7 +112,7 @@ public class TCustomSocket extends TIOStreamTransport {
timeout_ = timeout;
initSocket();
}
-
+
/**
* Initializes the socket object
*/
@@ -126,7 +126,7 @@ public class TCustomSocket extends TIOStreamTransport {
LOGGER.error("Could not configure socket.", sx);
}
}
-
+
/**
* Sets the socket timeout
*
@@ -140,7 +140,7 @@ public class TCustomSocket extends TIOStreamTransport {
LOGGER.warn("Could not set socket timeout.", sx);
}
}
-
+
/**
* Returns a reference to the underlying socket.
*/
@@ -150,7 +150,7 @@ public class TCustomSocket extends TIOStreamTransport {
}
return socket_;
}
-
+
/**
* Checks whether the socket is connected.
*/
@@ -160,7 +160,7 @@ public class TCustomSocket extends TIOStreamTransport {
}
return socket_.isConnected();
}
-
+
/**
* Connects the socket, creating a new socket object if necessary.
*/
@@ -168,18 +168,18 @@ public class TCustomSocket extends TIOStreamTransport {
if (isOpen()) {
throw new TTransportException(TTransportException.ALREADY_OPEN, "Socket already connected.");
}
-
+
if (host_.length() == 0) {
throw new TTransportException(TTransportException.NOT_OPEN, "Cannot open null host.");
}
if (port_ <= 0) {
throw new TTransportException(TTransportException.NOT_OPEN, "Cannot open without port.");
}
-
+
if (socket_ == null) {
initSocket();
}
-
+
try {
socket_.connect(new InetSocketAddress(host_, port_), timeout_);
inputStream_ = new BufferedInputStream(socket_.getInputStream(), 1024);
@@ -189,14 +189,14 @@ public class TCustomSocket extends TIOStreamTransport {
throw new TTransportException(TTransportException.NOT_OPEN, iox);
}
}
-
+
/**
* Closes the socket.
*/
public void close() {
// Close the underlying streams
super.close();
-
+
// Close the socket
if (socket_ != null) {
try {
@@ -207,5 +207,5 @@ public class TCustomSocket extends TIOStreamTransport {
socket_ = null;
}
}
-
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/thrift/ThriftValidation.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java b/src/java/org/apache/cassandra/thrift/ThriftValidation.java
index e996ce3..ff833df 100644
--- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java
+++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.thrift;
/*
- *
+ *
* 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.thrift;
* 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.nio.ByteBuffer;
@@ -678,16 +678,16 @@ public class ThriftValidation
if (!oldCd.getIndexName().equals(c.index_name))
throw new InvalidRequestException("Cannot modify index name");
}
-
+
if (c.index_type == IndexType.CUSTOM)
{
if (c.index_options == null || !c.index_options.containsKey(SecondaryIndex.CUSTOM_INDEX_OPTION_NAME))
- throw new InvalidRequestException("Required index option missing: " + SecondaryIndex.CUSTOM_INDEX_OPTION_NAME);
+ throw new InvalidRequestException("Required index option missing: " + SecondaryIndex.CUSTOM_INDEX_OPTION_NAME);
}
-
+
// Create the index type and validate the options
ColumnDefinition cdef = ColumnDefinition.fromThrift(c);
-
+
// This method validates the column metadata but does not intialize the index
SecondaryIndex.createInstance(null, cdef);
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 04324f2..84618be 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -1,6 +1,6 @@
package org.apache.cassandra.tools;
/*
- *
+ *
* 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.tools;
* 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.
- *
+ *
*/
@@ -60,7 +60,7 @@ public class NodeCmd
private static ToolOptions options = null;
private NodeProbe probe;
-
+
static
{
options = new ToolOptions();
@@ -72,7 +72,7 @@ public class NodeCmd
options.addOption(TAG_OPT, true, "optional name to give a snapshot");
options.addOption(PRIMARY_RANGE_OPT, false, "only repair the first range returned by the partitioner for the node");
}
-
+
public NodeCmd(NodeProbe probe)
{
this.probe = probe;
@@ -124,7 +124,7 @@ public class NodeCmd
RESETLOCALSCHEMA
}
-
+
/**
* Prints usage information to stdout.
*/
@@ -199,10 +199,10 @@ public class NodeCmd
for (int i = cmd.length(); i < 22; ++i) sb.append(" ");
sb.append(" - ").append(description).append("\n");
}
-
+
/**
* Write a textual representation of the Cassandra ring.
- *
+ *
* @param outs the stream to write to
*/
public void printRing(PrintStream outs, String keyspace)
@@ -218,7 +218,7 @@ public class NodeCmd
Map<String, String> loadMap = probe.getLoadMap();
String format = "%-16s%-12s%-12s%-7s%-8s%-16s%-20s%-44s%n";
-
+
// Calculate per-token ownership of the ring
Map<String, Float> ownerships;
try
@@ -232,7 +232,7 @@ public class NodeCmd
outs.printf("Note: Ownership information does not include topology, please specify a keyspace. \n");
outs.printf(format, "Address", "DC", "Rack", "Status", "State", "Load", "Owns", "Token");
}
-
+
// show pre-wrap token twice so you can always read a node's range as
// (previous line token, current line token]
if (sortedTokens.size() > 1)
@@ -308,7 +308,7 @@ public class NodeCmd
/**
* Write node information.
- *
+ *
* @param outs the stream to write to
*/
public void printInfo(PrintStream outs)
@@ -532,7 +532,7 @@ public class NodeCmd
outs.println("\t\tSSTable count: " + cfstore.getLiveSSTableCount());
outs.println("\t\tSpace used (live): " + cfstore.getLiveDiskSpaceUsed());
outs.println("\t\tSpace used (total): " + cfstore.getTotalDiskSpaceUsed());
- outs.println("\t\tNumber of Keys (estimate): " + cfstore.estimateKeys());
+ outs.println("\t\tNumber of Keys (estimate): " + cfstore.estimateKeys());
outs.println("\t\tMemtable Columns Count: " + cfstore.getMemtableColumnsCount());
outs.println("\t\tMemtable Data Size: " + cfstore.getMemtableDataSize());
outs.println("\t\tMemtable Switch Count: " + cfstore.getMemtableSwitchCount());
@@ -553,7 +553,7 @@ public class NodeCmd
outs.println("----------------");
}
}
-
+
public void printRemovalStatus(PrintStream outs)
{
outs.println("RemovalStatus: " + probe.getRemovalStatus());
@@ -621,7 +621,7 @@ public class NodeCmd
String host = cmd.hasOption(HOST_OPT.left) ? cmd.getOptionValue(HOST_OPT.left) : DEFAULT_HOST;
int port = DEFAULT_PORT;
-
+
String portNum = cmd.getOptionValue(PORT_OPT.left);
if (portNum != null)
{
@@ -637,7 +637,7 @@ public class NodeCmd
String username = cmd.getOptionValue(USERNAME_OPT.left);
String password = cmd.getOptionValue(PASSWORD_OPT.left);
-
+
NodeProbe probe = null;
try
{
@@ -668,7 +668,7 @@ public class NodeCmd
switch (command)
{
- case RING :
+ case RING :
if (arguments.length > 0) { nodeCmd.printRing(System.out, arguments[0]); }
else { nodeCmd.printRing(System.out, null); };
break;
@@ -685,7 +685,7 @@ public class NodeCmd
case ENABLETHRIFT : probe.startThriftServer(); break;
case STATUSTHRIFT : nodeCmd.printIsThriftServerRunning(System.out); break;
case RESETLOCALSCHEMA: probe.resetLocalSchema(); break;
-
+
case DRAIN :
try { probe.drain(); }
catch (ExecutionException ee) { err(ee, "Error occured during flushing"); }
@@ -797,7 +797,7 @@ public class NodeCmd
probe.rebuildIndex(arguments[0], arguments[1], arguments[2].split(","));
else
probe.rebuildIndex(arguments[0], arguments[1]);
-
+
break;
case GOSSIPINFO : nodeCmd.printGossipInfo(System.out); break;
@@ -862,7 +862,7 @@ public class NodeCmd
outs.println("\t" + tokenString);
}
}
-
+
private void printGossipInfo(PrintStream out) {
out.println(probe.getGossipInfo());
}
@@ -880,7 +880,7 @@ public class NodeCmd
e.printStackTrace();
System.exit(3);
}
-
+
private static void complainNonzeroArgs(String[] args, NodeCommand cmd)
{
if (args.length > 0) {
@@ -893,18 +893,18 @@ public class NodeCmd
private static void handleSnapshots(NodeCommand nc, String tag, String[] cmdArgs, NodeProbe probe) throws InterruptedException, IOException
{
String[] keyspaces = Arrays.copyOfRange(cmdArgs, 0, cmdArgs.length);
- System.out.print("Requested snapshot for: ");
- if ( keyspaces.length > 0 )
+ System.out.print("Requested snapshot for: ");
+ if ( keyspaces.length > 0 )
{
- for (int i = 0; i < keyspaces.length; i++)
- System.out.print(keyspaces[i] + " ");
- }
- else
+ for (int i = 0; i < keyspaces.length; i++)
+ System.out.print(keyspaces[i] + " ");
+ }
+ else
{
System.out.print("all keyspaces");
}
System.out.println();
-
+
switch (nc)
{
case SNAPSHOT :
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index fc0c21c..b0d9019 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -104,7 +104,7 @@ public class NodeProbe
/**
* Creates a NodeProbe using the specified JMX host and port.
- *
+ *
* @param host hostname or IP address of the JMX agent
* @param port TCP port of the remote JMX agent
* @throws IOException on connection failures
@@ -115,10 +115,10 @@ public class NodeProbe
this.port = port;
connect();
}
-
+
/**
* Creates a NodeProbe using the specified JMX host and default port.
- *
+ *
* @param host hostname or IP address of the JMX agent
* @throws IOException on connection failures
*/
@@ -128,10 +128,10 @@ public class NodeProbe
this.port = defaultPort;
connect();
}
-
+
/**
* Create a connection to the JMX agent and setup the M[X]Bean proxies.
- *
+ *
* @throws IOException on connection failures
*/
private void connect() throws IOException
@@ -145,7 +145,7 @@ public class NodeProbe
}
jmxc = JMXConnectorFactory.connect(jmxUrl, env);
mbeanServerConn = jmxc.getMBeanServerConnection();
-
+
try
{
ObjectName name = new ObjectName(ssObjName);
@@ -165,8 +165,8 @@ public class NodeProbe
throw new RuntimeException(
"Invalid ObjectName? Please report this as a bug.", e);
}
-
- memProxy = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConn,
+
+ memProxy = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConn,
ManagementFactory.MEMORY_MXBEAN_NAME, MemoryMXBean.class);
runtimeProxy = ManagementFactory.newPlatformMXBeanProxy(
mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class);
@@ -224,9 +224,9 @@ public class NodeProbe
public void drain() throws IOException, InterruptedException, ExecutionException
{
- ssProxy.drain();
+ ssProxy.drain();
}
-
+
public Map<String, String> getTokenToEndpointMap()
{
return ssProxy.getTokenToEndpointMap();
@@ -256,7 +256,7 @@ public class NodeProbe
{
return ssProxy.getUnreachableNodes();
}
-
+
public Map<String, String> getLoadMap()
{
return ssProxy.getLoadMap();
@@ -311,7 +311,7 @@ public class NodeProbe
{
return ssProxy.getToken();
}
-
+
public String getLoadString()
{
return ssProxy.getLoadString();
@@ -326,20 +326,20 @@ public class NodeProbe
{
return ssProxy.getCurrentGenerationNumber();
}
-
+
public long getUptime()
{
return runtimeProxy.getUptime();
}
-
+
public MemoryUsage getHeapMemoryUsage()
{
return memProxy.getHeapMemoryUsage();
}
-
+
/**
* Take a snapshot of all the tables.
- *
+ *
* @param snapshotName the name of the snapshot.
*/
public void takeSnapshot(String snapshotName, String... keyspaces) throws IOException
@@ -389,7 +389,7 @@ public class NodeProbe
{
ssProxy.forceRemoveCompletion();
}
-
+
public Iterator<Map.Entry<String, JMXEnabledThreadPoolExecutorMBean>> getThreadPoolMBeanProxies()
{
try
@@ -508,14 +508,14 @@ public class NodeProbe
throw new RuntimeException(e);
}
}
-
+
public ColumnFamilyStoreMBean getCfsProxy(String ks, String cf)
{
ColumnFamilyStoreMBean cfsProxy = null;
try
{
cfsProxy = JMX.newMBeanProxy(mbeanServerConn,
- new ObjectName("org.apache.cassandra.db:type=ColumnFamilies,keyspace="+ks+",columnfamily="+cf),
+ new ObjectName("org.apache.cassandra.db:type=ColumnFamilies,keyspace="+ks+",columnfamily="+cf),
ColumnFamilyStoreMBean.class);
}
catch (MalformedObjectNameException mone)
@@ -669,7 +669,7 @@ class ColumnFamilyStoreMBeanIterator implements Iterator<Map.Entry<String, Colum
{
private Iterator<ObjectName> resIter;
private MBeanServerConnection mbeanServerConn;
-
+
public ColumnFamilyStoreMBeanIterator(MBeanServerConnection mbeanServerConn)
throws MalformedObjectNameException, NullPointerException, IOException
{
@@ -701,8 +701,8 @@ class ThreadPoolProxyMBeanIterator implements Iterator<Map.Entry<String, JMXEnab
{
private Iterator<ObjectName> resIter;
private MBeanServerConnection mbeanServerConn;
-
- public ThreadPoolProxyMBeanIterator(MBeanServerConnection mbeanServerConn)
+
+ public ThreadPoolProxyMBeanIterator(MBeanServerConnection mbeanServerConn)
throws MalformedObjectNameException, NullPointerException, IOException
{
Set<ObjectName> requests = mbeanServerConn.queryNames(new ObjectName("org.apache.cassandra.request:type=*"), null);
@@ -710,7 +710,7 @@ class ThreadPoolProxyMBeanIterator implements Iterator<Map.Entry<String, JMXEnab
resIter = Iterables.concat(requests, internal).iterator();
this.mbeanServerConn = mbeanServerConn;
}
-
+
public boolean hasNext()
{
return resIter.hasNext();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/tools/SSTableExport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java b/src/java/org/apache/cassandra/tools/SSTableExport.java
index f1d32e4..8c3dd24 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -55,7 +55,7 @@ public class SSTableExport
private static Options options;
private static CommandLine cmd;
-
+
static
{
options = new Options();
@@ -203,7 +203,7 @@ public class SSTableExport
/**
* Enumerate row keys from an SSTableReader and write the result to a PrintStream.
- *
+ *
* @param ssTableFile the file to export the rows from
* @param outs PrintStream to write the output to
* @throws IOException on failure to read/write input/output
@@ -231,7 +231,7 @@ public class SSTableExport
/**
* Export specific rows from an SSTable and write the resulting JSON to a PrintStream.
- *
+ *
* @param ssTableFile the SSTableScanner to export the rows from
* @param outs PrintStream to write the output to
* @param toExport the keys corresponding to the rows to export
@@ -329,7 +329,7 @@ public class SSTableExport
/**
* Export an SSTable and write the resulting JSON to a PrintStream.
- *
+ *
* @param ssTableFile the SSTable to export
* @param outs PrintStream to write the output to
* @param excludes keys to exclude from export
@@ -343,7 +343,7 @@ public class SSTableExport
/**
* Export an SSTable and write the resulting JSON to standard out.
- *
+ *
* @param ssTableFile SSTable to export
* @param excludes keys to exclude from export
*
@@ -357,7 +357,7 @@ public class SSTableExport
/**
* Given arguments specifying an SSTable, and optionally an output file,
* export the contents of the SSTable to JSON.
- *
+ *
* @param args command lines arguments
*
* @throws IOException on failure to open/read/write files or output streams
@@ -366,7 +366,7 @@ public class SSTableExport
public static void main(String[] args) throws IOException, ConfigurationException
{
String usage = String.format("Usage: %s <sstable> [-k key [-k key [...]] -x key [-x key [...]]]%n", SSTableExport.class.getName());
-
+
CommandLineParser parser = new PosixParser();
try
{
@@ -386,7 +386,7 @@ public class SSTableExport
System.err.println(usage);
System.exit(1);
}
-
+
String[] keys = cmd.getOptionValues(KEY_OPTION);
String[] excludes = cmd.getOptionValues(EXCLUDEKEY_OPTION);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/tools/SSTableImport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/SSTableImport.java b/src/java/org/apache/cassandra/tools/SSTableImport.java
index 2d97ae5..7098c10 100644
--- a/src/java/org/apache/cassandra/tools/SSTableImport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableImport.java
@@ -176,7 +176,7 @@ public class SSTableImport
/**
* Add columns to a column family.
- *
+ *
* @param row the columns associated with a row
* @param superName name of the super column if any
* @param cfamily the column family to add columns to
@@ -209,10 +209,10 @@ public class SSTableImport
}
}
}
-
+
/**
* Add super columns to a column family.
- *
+ *
* @param row the super columns associated with a row
* @param cfamily the column family to add columns to
*/
@@ -239,7 +239,7 @@ public class SSTableImport
/**
* Convert a JSON formatted file to an SSTable.
- *
+ *
* @param jsonFile the file containing JSON formatted data
* @param keyspace keyspace the data belongs to
* @param cf column family the data belongs to
@@ -424,7 +424,7 @@ public class SSTableImport
/**
* Converts JSON to an SSTable file. JSON input can either be a file specified
* using an optional command line argument, or supplied on standard in.
- *
+ *
* @param args command line arguments
* @throws IOException on failure to open/read/write files or output streams
* @throws ParseException on failure to parse JSON input
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07cdfd07/src/java/org/apache/cassandra/utils/Allocator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/Allocator.java b/src/java/org/apache/cassandra/utils/Allocator.java
index 671111c..b0fdd91 100644
--- a/src/java/org/apache/cassandra/utils/Allocator.java
+++ b/src/java/org/apache/cassandra/utils/Allocator.java
@@ -38,4 +38,4 @@ public abstract class Allocator
}
public abstract ByteBuffer allocate(int size);
-}
+}