Author: gdusbabek
Date: Wed Feb 10 17:12:02 2010
New Revision: 908590
URL: http://svn.apache.org/viewvc?rev=908590&view=rev
Log:
initiate boostrapper in current thread. patch by Gary Dusbabek, reviewed by
Jonthan Ellis. CASSANDRA-780
Modified:
incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
Modified:
incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
URL:
http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java?rev=908590&r1=908589&r2=908590&view=diff
==============================================================================
---
incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
(original)
+++
incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
Wed Feb 10 17:12:02 2010
@@ -65,27 +65,21 @@
public void startBootstrap() throws IOException
{
- new Thread(new Runnable()
- {
- public void run()
+ if (logger.isDebugEnabled())
+ logger.debug("Beginning bootstrap process");
+ for (String table : DatabaseDescriptor.getNonSystemTables())
+ {
+ Multimap<Range, InetAddress> rangesWithSourceTarget =
getRangesWithSources(table);
+ /* Send messages to respective folks to stream data over to me */
+ for (Map.Entry<InetAddress, Collection<Range>> entry :
getWorkMap(rangesWithSourceTarget).asMap().entrySet())
{
+ InetAddress source = entry.getKey();
+ StorageService.instance.addBootstrapSource(source, table);
if (logger.isDebugEnabled())
- logger.debug("Beginning bootstrap process");
- for (String table : DatabaseDescriptor.getNonSystemTables())
- {
- Multimap<Range, InetAddress> rangesWithSourceTarget =
getRangesWithSources(table);
- /* Send messages to respective folks to stream data over
to me */
- for (Map.Entry<InetAddress, Collection<Range>> entry :
getWorkMap(rangesWithSourceTarget).asMap().entrySet())
- {
- InetAddress source = entry.getKey();
- StorageService.instance.addBootstrapSource(source,
table);
- if (logger.isDebugEnabled())
- logger.debug("Requesting from " + source + "
ranges " + StringUtils.join(entry.getValue(), ", "));
- StreamIn.requestRanges(source, table,
entry.getValue());
- }
- }
+ logger.debug("Requesting from " + source + " ranges " +
StringUtils.join(entry.getValue(), ", "));
+ StreamIn.requestRanges(source, table, entry.getValue());
}
- }, "Boostrap requester").start();
+ }
}
/**