Skip to content

Commit 3b5b4b4

Browse files
committed
Move from CamelCase to '_' casing, closes #116.
1 parent 3f8acbd commit 3b5b4b4

File tree

189 files changed

+813
-994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+813
-994
lines changed

.idea/dictionaries/kimchy.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/elasticsearch/src/main/java/org/elasticsearch/action/delete/TransportDeleteAction.java

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,27 @@ public class TransportDeleteAction extends TransportShardReplicationOperationAct
5353
TransportCreateIndexAction createIndexAction) {
5454
super(settings, transportService, clusterService, indicesService, threadPool, shardStateAction);
5555
this.createIndexAction = createIndexAction;
56-
this.autoCreateIndex = componentSettings.getAsBoolean("autoCreateIndex", true);
56+
this.autoCreateIndex = settings.getAsBoolean("action.auto_create_index", true);
5757
}
5858

5959
@Override protected void doExecute(final DeleteRequest deleteRequest, final ActionListener<DeleteResponse> listener) {
60-
if (autoCreateIndex) {
61-
if (!clusterService.state().metaData().hasConcreteIndex(deleteRequest.index())) {
62-
createIndexAction.execute(new CreateIndexRequest(deleteRequest.index()), new ActionListener<CreateIndexResponse>() {
63-
@Override public void onResponse(CreateIndexResponse result) {
64-
TransportDeleteAction.super.doExecute(deleteRequest, listener);
65-
}
60+
if (autoCreateIndex && !clusterService.state().metaData().hasConcreteIndex(deleteRequest.index())) {
61+
createIndexAction.execute(new CreateIndexRequest(deleteRequest.index()), new ActionListener<CreateIndexResponse>() {
62+
@Override public void onResponse(CreateIndexResponse result) {
63+
TransportDeleteAction.super.doExecute(deleteRequest, listener);
64+
}
6665

67-
@Override public void onFailure(Throwable e) {
68-
if (ExceptionsHelper.unwrapCause(e) instanceof IndexAlreadyExistsException) {
69-
// we have the index, do it
70-
TransportDeleteAction.super.doExecute(deleteRequest, listener);
71-
} else {
72-
listener.onFailure(e);
73-
}
66+
@Override public void onFailure(Throwable e) {
67+
if (ExceptionsHelper.unwrapCause(e) instanceof IndexAlreadyExistsException) {
68+
// we have the index, do it
69+
TransportDeleteAction.super.doExecute(deleteRequest, listener);
70+
} else {
71+
listener.onFailure(e);
7472
}
75-
});
76-
} else {
77-
super.doExecute(deleteRequest, listener);
78-
}
73+
}
74+
});
75+
} else {
76+
super.doExecute(deleteRequest, listener);
7977
}
8078
}
8179

modules/elasticsearch/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public class TransportIndexAction extends TransportShardReplicationOperationActi
6969
super(settings, transportService, clusterService, indicesService, threadPool, shardStateAction);
7070
this.createIndexAction = createIndexAction;
7171
this.mappingUpdatedAction = mappingUpdatedAction;
72-
this.autoCreateIndex = settings.getAsBoolean("action.autoCreateIndex", true);
73-
this.allowIdGeneration = componentSettings.getAsBoolean("allowIdGeneration", true);
72+
this.autoCreateIndex = settings.getAsBoolean("action.auto_create_index", true);
73+
this.allowIdGeneration = componentSettings.getAsBoolean("allow_id_generation", true);
7474
}
7575

7676
@Override protected void doExecute(final IndexRequest indexRequest, final ActionListener<IndexResponse> listener) {

modules/elasticsearch/src/main/java/org/elasticsearch/action/mlt/MoreLikeThisRequest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class MoreLikeThisRequest implements ActionRequest {
5858
private String[] fields;
5959

6060
private float percentTermsToMatch = -1;
61-
private int minTermFrequency = -1;
61+
private int minTermFreq = -1;
6262
private int maxQueryTerms = -1;
6363
private String[] stopWords = null;
6464
private int minDocFreq = -1;
@@ -165,16 +165,16 @@ public float percentTermsToMatch() {
165165
/**
166166
* The frequency below which terms will be ignored in the source doc. Defaults to <tt>2</tt>.
167167
*/
168-
public MoreLikeThisRequest minTermFrequency(int minTermFrequency) {
169-
this.minTermFrequency = minTermFrequency;
168+
public MoreLikeThisRequest minTermFreq(int minTermFreq) {
169+
this.minTermFreq = minTermFreq;
170170
return this;
171171
}
172172

173173
/**
174174
* The frequency below which terms will be ignored in the source doc. Defaults to <tt>2</tt>.
175175
*/
176-
public int minTermFrequency() {
177-
return this.minTermFrequency;
176+
public int minTermFreq() {
177+
return this.minTermFreq;
178178
}
179179

180180
/**
@@ -470,7 +470,7 @@ public Scroll searchScroll() {
470470
}
471471

472472
percentTermsToMatch = in.readFloat();
473-
minTermFrequency = in.readVInt();
473+
minTermFreq = in.readVInt();
474474
maxQueryTerms = in.readVInt();
475475
size = in.readVInt();
476476
if (size > 0) {
@@ -539,7 +539,7 @@ public Scroll searchScroll() {
539539
}
540540

541541
out.writeFloat(percentTermsToMatch);
542-
out.writeVInt(minTermFrequency);
542+
out.writeVInt(minTermFreq);
543543
out.writeVInt(maxQueryTerms);
544544
if (stopWords == null) {
545545
out.writeVInt(0);

modules/elasticsearch/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private void addMoreLikeThis(MoreLikeThisRequest request, BoolJsonQueryBuilder b
227227
.maxDocFreq(request.maxDocFreq())
228228
.minWordLen(request.minWordLen())
229229
.maxWordLen(request.maxWordLen())
230-
.minTermFrequency(request.minTermFrequency())
230+
.minTermFreq(request.minTermFreq())
231231
.maxQueryTerms(request.maxQueryTerms())
232232
.stopWords(request.stopWords());
233233
boolBuilder.should(mlt);

modules/elasticsearch/src/main/java/org/elasticsearch/action/search/SearchResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public String scrollId() {
126126
builder.startObject();
127127
if (shardFailure.shard() != null) {
128128
builder.field("index", shardFailure.shard().index());
129-
builder.field("shardId", shardFailure.shard().shardId());
129+
builder.field("shard", shardFailure.shard().shardId());
130130
}
131131
builder.field("reason", shardFailure.reason());
132132
builder.endObject();

modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
import static org.elasticsearch.util.settings.ImmutableSettings.*;
4646

4747
/**
48-
* @author kimchy (Shay Banon)
48+
* A main entry point when starting from the command line.
49+
*
50+
* @author kimchy (shay.banon)
4951
*/
5052
public class Bootstrap {
5153

modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClientNodesService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ public class TransportClientNodesService extends AbstractComponent implements Cl
8484
this.transportService = transportService;
8585
this.threadPool = threadPool;
8686

87-
this.nodesSamplerInterval = componentSettings.getAsTime("nodesSamplerInterval", timeValueSeconds(1));
87+
this.nodesSamplerInterval = componentSettings.getAsTime("nodes_sampler_interval", timeValueSeconds(1));
88+
89+
if (logger.isDebugEnabled()) {
90+
logger.debug("node_sampler_interval[" + nodesSamplerInterval + "]");
91+
}
8892

8993
this.nodesSamplerFuture = threadPool.scheduleWithFixedDelay(nodesSampler, nodesSamplerInterval);
9094

modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
@Immutable
4646
public class IndexMetaData {
4747

48-
public static final String SETTING_NUMBER_OF_SHARDS = "index.numberOfShards";
48+
public static final String SETTING_NUMBER_OF_SHARDS = "index.number_of_shards";
4949

50-
public static final String SETTING_NUMBER_OF_REPLICAS = "index.numberOfReplicas";
50+
public static final String SETTING_NUMBER_OF_REPLICAS = "index.number_of_replicas";
5151

5252
private final String index;
5353

modules/elasticsearch/src/main/java/org/elasticsearch/discovery/DiscoveryService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class DiscoveryService extends AbstractLifecycleComponent<DiscoveryServic
4343
@Inject public DiscoveryService(Settings settings, Discovery discovery) {
4444
super(settings);
4545
this.discovery = discovery;
46-
this.initialStateTimeout = componentSettings.getAsTime("initialStateTimeout", TimeValue.timeValueSeconds(30));
46+
this.initialStateTimeout = componentSettings.getAsTime("initial_state_timeout", TimeValue.timeValueSeconds(30));
4747
}
4848

4949
@Override protected void doStart() throws ElasticSearchException {

0 commit comments

Comments
 (0)