Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
1.0.0.RC1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jprante committed Jan 16, 2014
1 parent 4529993 commit d01e26b
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 43 deletions.
21 changes: 8 additions & 13 deletions README.rst
Expand Up @@ -30,21 +30,16 @@ With large indices, or on production machines, unpredictable exceptions may happ
Installation
------------

Current version of the plugin: **3.2.0** (Nov 9, 2013)

.. image:: https://travis-ci.org/jprante/elasticsearch-skywalker.png

Prerequisites::

Elasticsearch 0.90.x

============= ========= ================= ============================================================
ES version Plugin Release date Command
------------- --------- ----------------- ------------------------------------------------------------
0.90.0 3.0.0 May 24, 2013 ./bin/plugin --install skywalker --url http://bit.ly/1eYTIHj
0.90.5 **3.1.0** Nov 9, 2013 ./bin/plugin --install skywalker --url http://bit.ly/HFJos6
0.90.6 **3.2.0** Nov 9, 2013 ./bin/plugin --install skywalker --url http://bit.ly/19PbcoJ
============= ========= ================= ============================================================
============= =========== ================= ============================================================
ES version Plugin Release date Command
------------- ----------- ----------------- ------------------------------------------------------------
0.90.0 3.0.0 May 24, 2013 ./bin/plugin --install skywalker --url http://bit.ly/1eYTIHj
0.90.5 3.1.0 Nov 9, 2013 ./bin/plugin --install skywalker --url http://bit.ly/HFJos6
0.90.6 3.2.0 Nov 9, 2013 ./bin/plugin --install skywalker --url http://bit.ly/19PbcoJ
1.0.0.RC1 1.0.0.RC1.1 Jan 16, 2014 ./bin/plugin --install skywalker --url http://bit.ly/1htPlFK
============= =========== ================= ============================================================

Do not forget to restart the node after installing.

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -7,7 +7,7 @@

<groupId>org.xbib.elasticsearch.plugin</groupId>
<artifactId>elasticsearch-skywalker</artifactId>
<version>3.2.0</version>
<version>1.0.0.RC1.1</version>

<packaging>jar</packaging>

Expand Down Expand Up @@ -69,7 +69,7 @@
<properties>
<github.global.server>github</github.global.server>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<elasticsearch.version>0.90.6</elasticsearch.version>
<elasticsearch.version>1.0.0.RC1</elasticsearch.version>
</properties>

<dependencies>
Expand Down
@@ -1,7 +1,7 @@

package org.xbib.elasticsearch.action.admin.cluster.state;

import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction;
import org.elasticsearch.cluster.ClusterName;
Expand Down Expand Up @@ -59,7 +59,7 @@ protected ConsistencyCheckResponse newResponse() {
}

@Override
protected void masterOperation(ConsistencyCheckRequest request, ClusterState state, ActionListener<ConsistencyCheckResponse> listener) throws ElasticSearchException {
protected void masterOperation(ConsistencyCheckRequest request, ClusterState state, ActionListener<ConsistencyCheckResponse> listener) throws ElasticsearchException {
ClusterState.Builder builder = builder();
List<File> files = new ArrayList();
builder.metaData(Skywalker.loadState(files, nodeEnv));
Expand Down
@@ -1,7 +1,7 @@
package org.xbib.elasticsearch.action.admin.indices.reconstruct;

import org.apache.lucene.index.IndexReader;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException;
Expand Down Expand Up @@ -98,7 +98,7 @@ protected BroadcastShardOperationResponse newShardResponse() {
}

@Override
protected ShardReconstructIndexResponse shardOperation(ShardReconstructIndexRequest request) throws ElasticSearchException {
protected ShardReconstructIndexResponse shardOperation(ShardReconstructIndexRequest request) throws ElasticsearchException {
IndexService indexService = indicesService.indexService(request.index());
InternalIndexShard indexShard = (InternalIndexShard) indexService.shardSafe(request.shardId());
Engine.Searcher searcher = indexShard.engine().acquireSearcher("transport_reconstruct");
Expand All @@ -107,7 +107,7 @@ protected ShardReconstructIndexResponse shardOperation(ShardReconstructIndexRequ
try {
return new ShardReconstructIndexResponse(true, dr.reconstruct(request.shardId()));
} catch (IOException e) {
throw new ElasticSearchException("failed to reconstruct index", e);
throw new ElasticsearchException("failed to reconstruct index", e);
} finally {
searcher.release();
}
Expand Down
Expand Up @@ -12,7 +12,7 @@
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.MultiFields;
import org.apache.lucene.store.Directory;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException;
Expand Down Expand Up @@ -134,7 +134,7 @@ protected ShardSkywalkerResponse newShardResponse() {
}

@Override
protected ShardSkywalkerResponse shardOperation(ShardSkywalkerRequest request) throws ElasticSearchException {
protected ShardSkywalkerResponse shardOperation(ShardSkywalkerRequest request) throws ElasticsearchException {
synchronized (mutex) {
IndexService indexService = indicesService.indexServiceSafe(request.index());
InternalIndexShard indexShard = (InternalIndexShard) indexService.shardSafe(request.shardId());
Expand Down Expand Up @@ -211,7 +211,7 @@ protected ShardSkywalkerResponse shardOperation(ShardSkywalkerRequest request) t
response.put("topterms", termList);
return new ShardSkywalkerResponse(request.index(), request.shardId()).setResponse(response);
} catch (Exception ex) {
throw new ElasticSearchException(ex.getMessage(), ex);
throw new ElasticsearchException(ex.getMessage(), ex);
} finally {
searcher.release();
}
Expand Down
Expand Up @@ -6,6 +6,8 @@
import org.elasticsearch.cluster.metadata.IndexTemplateMetaData;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.hppc.cursors.ObjectCursor;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;

Expand All @@ -30,18 +32,18 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
builder.field("version", metadata.version());
builder.field("numberOfShards", metadata.numberOfShards());
builder.startArray("concreteIndices");
for (String index : metadata.concreteAllIndicesAsSet()) {
for (String index : metadata.concreteAllIndices()) {
builder.value(index);
}
builder.endArray();
Map<String, Map<String, AliasMetaData>> aliases = metadata.getAliases();
ImmutableOpenMap<String, ImmutableOpenMap<String, AliasMetaData>> aliases = metadata.getAliases();
builder.startArray("aliases");
for (String alias : aliases.keySet()) {
builder.startObject(alias);
for (ObjectCursor<String> alias : aliases.keys()) {
builder.startObject(alias.value);
builder.startArray("aliasMetadata");
for (String s : aliases.get(alias).keySet()) {
for (ObjectCursor<String> s : aliases.get(alias.value).keys()) {
builder.startObject();
AliasMetaData amd = aliases.get(alias).get(s);
AliasMetaData amd = aliases.get(alias.value).get(s.value);
builder.field("alias", amd.getAlias());
builder.field("filter", amd.getFilter().string());
builder.field("indexRouting", amd.getIndexRouting());
Expand All @@ -53,9 +55,9 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
}
builder.endArray();
builder.startArray("indexes");
Map<String,IndexMetaData> indices = metadata.getIndices();
for (String s : indices.keySet()) {
IndexMetaData imd = indices.get(s);
ImmutableOpenMap<String,IndexMetaData> indices = metadata.getIndices();
for (ObjectCursor<String> s : indices.keys()) {
IndexMetaData imd = indices.get(s.value);
builder.startObject();
builder.field("index", imd.getIndex());
builder.field("state", imd.getState().name());
Expand All @@ -64,15 +66,15 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
builder.field("totalNumberOfShards", imd.getTotalNumberOfShards());
builder.field("version", imd.getVersion());
builder.field("settings", imd.getSettings().getAsMap());
Map<String, MappingMetaData> m = imd.getMappings();
ImmutableOpenMap<String, MappingMetaData> m = imd.getMappings();
// skip mappings here
builder.endObject();
}
builder.endArray();
builder.startArray("templates");
Map<String,IndexTemplateMetaData> templates = metadata.getTemplates();
for (String s : templates.keySet()) {
IndexTemplateMetaData itmd = templates.get(s);
ImmutableOpenMap<String,IndexTemplateMetaData> templates = metadata.getTemplates();
for (ObjectCursor<String> s : templates.keys()) {
IndexTemplateMetaData itmd = templates.get(s.value);
itmd.getName();
itmd.getOrder();
itmd.getTemplate();
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/xbib/elasticsearch/skywalker/Skywalker.java
Expand Up @@ -34,7 +34,7 @@
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.util.BytesRef;

import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.Nullable;
Expand Down Expand Up @@ -379,7 +379,7 @@ public void getStoreMetadata(Map<String, Object> response, ImmutableMap<String,
* @throws Exception
*/

public static MetaData.Builder loadState(List<File> files, NodeEnvironment nodeEnv) throws ElasticSearchException {
public static MetaData.Builder loadState(List<File> files, NodeEnvironment nodeEnv) throws ElasticsearchException {
MetaData.Builder metaDataBuilder;
try {
MetaData globalMetaData = loadGlobalState(files, nodeEnv);
Expand All @@ -398,7 +398,7 @@ public static MetaData.Builder loadState(List<File> files, NodeEnvironment nodeE
}
}
} catch (Exception e) {
throw new ElasticSearchException(e.getMessage());
throw new ElasticsearchException(e.getMessage());
}
return metaDataBuilder;
}
Expand Down
Expand Up @@ -13,7 +13,7 @@
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.util.Bits;
import org.elasticsearch.ElasticSearchIllegalArgumentException;
import org.elasticsearch.ElasticsearchIllegalArgumentException;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.xbib.elasticsearch.action.skywalker.support.IndexableFieldToXContent;
Expand Down Expand Up @@ -45,18 +45,18 @@ public class DocumentReconstructor {
*/
public DocumentReconstructor(IndexReader indexReader) {
if (indexReader == null) {
throw new ElasticSearchIllegalArgumentException("reader cannot be null");
throw new ElasticsearchIllegalArgumentException("reader cannot be null");
}
try {
if (indexReader instanceof CompositeReader) {
this.reader = SlowCompositeReaderWrapper.wrap(indexReader);
} else if (indexReader instanceof AtomicReader) {
this.reader = (AtomicReader) indexReader;
} else {
throw new ElasticSearchIllegalArgumentException("unsupported IndexReader class " + indexReader.getClass().getName());
throw new ElasticsearchIllegalArgumentException("unsupported IndexReader class " + indexReader.getClass().getName());
}
} catch (IOException e) {
throw new ElasticSearchIllegalArgumentException(e.getMessage());
throw new ElasticsearchIllegalArgumentException(e.getMessage());
}
}

Expand Down

0 comments on commit d01e26b

Please sign in to comment.