Skip to content

Commit

Permalink
Update to forbidden-apis 1.4.1
Browse files Browse the repository at this point in the history
Closes #5492

Conflicts:
	src/test/java/org/elasticsearch/benchmark/search/scroll/ScrollSearchBenchmark.java
  • Loading branch information
Robert Muir committed Mar 22, 2014
1 parent 1081bf7 commit f9b0b31
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -1002,7 +1002,7 @@
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<version>1.4</version>
<version>1.4.1</version>

<executions>
<execution>
Expand Down
Expand Up @@ -38,6 +38,7 @@
import org.elasticsearch.search.aggregations.AggregationBuilders;

import java.util.List;
import java.util.Locale;
import java.util.Random;

import static org.elasticsearch.client.Requests.createIndexRequest;
Expand Down Expand Up @@ -266,9 +267,9 @@ public static void main(String[] args) throws Exception {
stats.add(termsStats("terms_stats_agg_sm_l_dv", Method.AGGREGATION, "sm_value_dv", "l_value_dv", null));

System.out.println("------------------ SUMMARY -------------------------------");
System.out.format("%25s%10s%10s\n", "name", "took", "millis");
System.out.format(Locale.ENGLISH, "%25s%10s%10s\n", "name", "took", "millis");
for (StatsResult stat : stats) {
System.out.format("%25s%10s%10d\n", stat.name, TimeValue.timeValueMillis(stat.took), (stat.took / QUERY_COUNT));
System.out.format(Locale.ENGLISH, "%25s%10s%10d\n", stat.name, TimeValue.timeValueMillis(stat.took), (stat.took / QUERY_COUNT));
}
System.out.println("------------------ SUMMARY -------------------------------");

Expand Down
Expand Up @@ -22,10 +22,7 @@
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.Lists;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Iterator;
import java.util.List;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;

/**
Expand Down Expand Up @@ -366,10 +363,10 @@ public void checkBalance() {

public void print(int depth) {
for (int i = 0; i < depth; i++) {
System.out.printf("| ");
System.out.print("| ");
}
int imbalance = Math.abs((left != null ? left.depth : 1) - (right != null ? right.depth : 1));
System.out.printf("%s%s, %d, %d, %d\n", (imbalance > 1 ? "* " : "") + (right != null && leaf.compareTo(right.first()) != 0 ? "+ " : ""), leaf, size, count, this.depth);
System.out.printf(Locale.ENGLISH, "%s%s, %d, %d, %d\n", (imbalance > 1 ? "* " : "") + (right != null && leaf.compareTo(right.first()) != 0 ? "+ " : ""), leaf, size, count, this.depth);
if (left != null) {
left.print(depth + 1);
right.print(depth + 1);
Expand Down

0 comments on commit f9b0b31

Please sign in to comment.