diff --git a/.gitignore b/.gitignore index 133071f20..70966b8fa 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ tools/docker/opentsdb.conf fat-jar-pom.xml src-resources/ test-resources/ +third_party/*/*.jar diff --git a/configure.ac b/configure.ac index 09130214e..37e8e7c76 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ # along with this library. If not, see . # Semantic Versioning (see http://semver.org/). -AC_INIT([opentsdb], [2.5.0-SNAPSHOT], [opentsdb@googlegroups.com]) +AC_INIT([opentsdb], [2.5.0-RC1], [opentsdb@googlegroups.com]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([foreign]) diff --git a/pom.xml.in b/pom.xml.in index 18f46f539..7c1eadee6 100644 --- a/pom.xml.in +++ b/pom.xml.in @@ -70,8 +70,8 @@ maven-compiler-plugin 2.5.1 - 1.6 - 1.6 + 1.8 + 1.8 -Xlint **/client/*.java @@ -326,7 +326,7 @@ javacc - 1.6 + 1.8 true net.opentsdb.query.expression.parser ${basedir}/src/ diff --git a/src/core/SaltScanner.java b/src/core/SaltScanner.java index a17524b85..76ec83bb0 100644 --- a/src/core/SaltScanner.java +++ b/src/core/SaltScanner.java @@ -960,7 +960,6 @@ private void validateAndTriggerCallback( histMap.put(scannersRunning, histograms); } - int scannersRunning = countdown.decrementAndGet(); if (scannersRunning <= 0) { try { mergeAndReturnResults(); diff --git a/src/core/SplitRollupSpanGroup.java b/src/core/SplitRollupSpanGroup.java index 1333c11e3..188fdd4b4 100644 --- a/src/core/SplitRollupSpanGroup.java +++ b/src/core/SplitRollupSpanGroup.java @@ -119,6 +119,7 @@ public Map call(ArrayList> resolvedTags) thr */ @Override public Bytes.ByteMap getTagUids() { + Bytes.ByteMap tagUids = new Bytes.ByteMap(); for (SpanGroup group : spanGroups) { tagUids.putAll(group.getTagUids()); diff --git a/src/query/QueryUtil.java b/src/query/QueryUtil.java index fc7f5e2e8..f04e3fb0b 100644 --- a/src/query/QueryUtil.java +++ b/src/query/QueryUtil.java @@ -418,39 +418,39 @@ public static void setDataTableScanFilter( final boolean explicit_tags, final boolean enable_fuzzy_filter, final int end_time) { - + // no-op - if ((group_bys == null || group_bys.isEmpty()) - && (row_key_literals == null || row_key_literals.isEmpty())) { + if ((group_bys == null || group_bys.isEmpty()) + && (row_key_literals == null || row_key_literals.isEmpty())) { return; } - + if (group_bys != null) { Collections.sort(group_bys, Bytes.MEMCMP); } final int prefix_width = Const.SALT_WIDTH() + TSDB.metrics_width() + - Const.TIMESTAMP_BYTES; + Const.TIMESTAMP_BYTES; final FuzzyRowFilter fuzzy_filter; if (explicit_tags && - enable_fuzzy_filter && - row_key_literals != null && - !row_key_literals.isEmpty()) { + enable_fuzzy_filter && + row_key_literals != null && + !row_key_literals.isEmpty()) { final byte[] fuzzy_key = new byte[prefix_width + (row_key_literals.size() * - (TSDB.tagk_width() + TSDB.tagv_width()))]; + (TSDB.tagk_width() + TSDB.tagv_width()))]; System.arraycopy(scanner.getCurrentKey(), 0, fuzzy_key, 0, - scanner.getCurrentKey().length); + scanner.getCurrentKey().length); final List fuzzy_filter_pairs = - buildFuzzyFilters(row_key_literals, fuzzy_key); + buildFuzzyFilters(row_key_literals, fuzzy_key); // The Fuzzy Filter list is sorted: the first and last filters row key // can be used to build the stop key for the scanner final byte[] stop_key = Arrays.copyOf( - fuzzy_filter_pairs.get(fuzzy_filter_pairs.size() - 1).getRowKey(), - fuzzy_key.length); + fuzzy_filter_pairs.get(fuzzy_filter_pairs.size() - 1).getRowKey(), + fuzzy_key.length); System.arraycopy(scanner.getCurrentKey(), 0, stop_key, 0, prefix_width); Internal.setBaseTime(stop_key, end_time); int idx = prefix_width + TSDB.tagk_width(); @@ -474,66 +474,25 @@ public static void setDataTableScanFilter( if (!Strings.isNullOrEmpty(regex)) { if (LOG.isDebugEnabled()) { LOG.debug("Regex for scanner: " + scanner + ": " + - byteRegexToString(regex)); + byteRegexToString(regex)); } regex_filter = new KeyRegexpFilter(regex.toString(), - Const.ASCII_CHARSET); + Const.ASCII_CHARSET); } else { regex_filter = null; } if (fuzzy_filter != null && !Strings.isNullOrEmpty(regex)) { final FilterList filter = new FilterList(Lists.newArrayList(fuzzy_filter, - regex_filter),Operator.MUST_PASS_ALL); + regex_filter), Operator.MUST_PASS_ALL); scanner.setFilter(filter); } else if (fuzzy_filter != null) { scanner.setFilter(fuzzy_filter); } else if (!Strings.isNullOrEmpty(regex)) { scanner.setFilter(regex_filter); } - - if (explicit_tags && enable_fuzzy_filter) { - final List fuzzy_filter_pairs = - buildFuzzyFilters(row_key_literals); - - // The Fuzzy Filter list is sorted: the first and last filters row key - // can be used to build a start and stop keys for the scanner - final byte[] start_key = Arrays.copyOf( - fuzzy_filter_pairs.get(0).getRowKey(), - fuzzy_filter_pairs.get(0).getRowKey().length); - System.arraycopy(scanner.getCurrentKey(), 0, start_key, 0, prefix_width); - - final byte[] stop_key = Arrays.copyOf( - fuzzy_filter_pairs.get(fuzzy_filter_pairs.size()-1).getRowKey(), - start_key.length); - System.arraycopy(scanner.getCurrentKey(), 0, - stop_key, 0, prefix_width); - Internal.setBaseTime(stop_key, end_time); - int idx = prefix_width + TSDB.tagk_width(); - // max out the tag values - while (idx < stop_key.length) { - for (int i = 0; i < TSDB.tagv_width(); i++) { - stop_key[idx++] = (byte) 0xFF; - } - idx += TSDB.tagk_width(); - } - - scanner.setStartKey(start_key); - scanner.setStopKey(stop_key); - scanner.setFilter(new FuzzyRowFilter(fuzzy_filter_pairs)); - } else { - final String regex = getRowKeyUIDRegex(row_key_literals, explicit_tags); - final KeyRegexpFilter regex_filter = new KeyRegexpFilter( - regex.toString(), Const.ASCII_CHARSET); - if (LOG.isDebugEnabled()) { - LOG.debug("Regex for scanner: " + scanner + ": " + - byteRegexToString(regex)); - } - - scanner.setFilter(regex_filter); - } } - + /** * Creates a regular expression with a list of or'd TUIDs to compare * against the rows in storage.