Permalink
Browse files

move to elasticsearch 0.19.0 snap and use some of its features

  • Loading branch information...
1 parent b34e10a commit 323a0b764717014e39d2569bf69e8ff8a9308872 @kimchy kimchy committed Jan 31, 2012
Showing with 5 additions and 6 deletions.
  1. +2 −2 README.md
  2. +1 −1 pom.xml
  3. +2 −3 src/main/java/org/elasticsearch/gateway/hdfs/HdfsGateway.java
View
@@ -8,8 +8,8 @@ In order to install the plugin, simply run: `bin/plugin -install elasticsearch/e
---------------------------------------
| Hadoop Plugin | ElasticSearch |
---------------------------------------
- | master | 0.18 -> master |
+ | master | master (0.19) |
---------------------------------------
- | 1.0.0 | 0.18 -> master |
+ | 1.0.0 | 0.18 |
---------------------------------------
View
@@ -31,7 +31,7 @@
</parent>
<properties>
- <elasticsearch.version>0.18.5</elasticsearch.version>
+ <elasticsearch.version>0.19.0-SNAPSHOT</elasticsearch.version>
</properties>
<repositories>
@@ -30,8 +30,6 @@
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.inject.Module;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.common.util.concurrent.DynamicExecutors;
import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.gateway.blobstore.BlobStoreGateway;
import org.elasticsearch.threadpool.ThreadPool;
@@ -40,6 +38,7 @@
import java.net.URI;
import java.util.Map;
import java.util.concurrent.ExecutorService;
+import java.util.concurrent.TimeUnit;
/**
*
@@ -69,7 +68,7 @@ public HdfsGateway(Settings settings, ThreadPool threadPool, ClusterService clus
Path hPath = new Path(new Path(path), clusterName.value());
int concurrentStreams = componentSettings.getAsInt("concurrent_streams", 5);
- this.concurrentStreamPool = DynamicExecutors.newScalingThreadPool(1, concurrentStreams, TimeValue.timeValueSeconds(5).millis(), EsExecutors.daemonThreadFactory(settings, "[s3_stream]"));
+ this.concurrentStreamPool = EsExecutors.newScalingExecutorService(1, concurrentStreams, 5, TimeUnit.SECONDS, EsExecutors.daemonThreadFactory(settings, "[s3_stream]"));
logger.debug("Using uri [{}], path [{}], concurrent_streams [{}]", uri, hPath, concurrentStreams);

0 comments on commit 323a0b7

Please sign in to comment.