lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject [40/40] lucene-solr:apiv2: Merge branch 'master' into apiv2
Date Tue, 02 Aug 2016 01:08:00 GMT
Merge branch 'master' into apiv2


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1d131592
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1d131592
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1d131592

Branch: refs/heads/apiv2
Commit: 1d131592c554e44f7cade97661831759fc0f7c2f
Parents: 003f9b7 d86c369
Author: Steve Rowe <sarowe@apache.org>
Authored: Mon Aug 1 21:06:45 2016 -0400
Committer: Steve Rowe <sarowe@apache.org>
Committed: Mon Aug 1 21:06:45 2016 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |   18 +
 .../lucene/analysis/minhash/MinHashFilter.java  |    1 +
 .../icu/src/data/uax29/MyanmarSyllable.rbbi     |   50 +
 .../segmentation/DefaultICUTokenizerConfig.java |   14 +-
 .../analysis/icu/segmentation/ICUTokenizer.java |    2 +-
 .../icu/segmentation/ICUTokenizerFactory.java   |    6 +-
 .../icu/segmentation/MyanmarSyllable.brk        |  Bin 0 -> 19776 bytes
 .../icu/segmentation/TestICUTokenizer.java      |    6 +-
 .../icu/segmentation/TestICUTokenizerCJK.java   |    2 +-
 .../icu/segmentation/TestMyanmarSyllable.java   |  156 ++
 .../segmentation/TestWithCJKBigramFilter.java   |    4 +-
 .../classification/utils/DatasetSplitter.java   |   14 +-
 .../lucene/codecs/MutablePointsReader.java      |   39 +
 .../codecs/lucene60/Lucene60PointsWriter.java   |    9 +
 .../org/apache/lucene/document/FieldType.java   |    2 +-
 .../apache/lucene/index/DocumentsWriter.java    |   11 -
 .../index/DocumentsWriterFlushControl.java      |   27 +-
 .../index/DocumentsWriterStallControl.java      |   26 +-
 .../apache/lucene/index/PointValuesWriter.java  |  160 +-
 .../java/org/apache/lucene/util/ArrayUtil.java  |   71 +-
 .../org/apache/lucene/util/ByteBlockPool.java   |    8 +
 .../org/apache/lucene/util/IntroSelector.java   |  126 ++
 .../org/apache/lucene/util/IntroSorter.java     |    7 +-
 .../org/apache/lucene/util/RadixSelector.java   |  202 +++
 .../java/org/apache/lucene/util/Selector.java   |   41 +
 .../org/apache/lucene/util/bkd/BKDWriter.java   |  489 ++++--
 .../util/bkd/MutablePointsReaderUtils.java      |  185 +++
 .../index/TestDocumentsWriterStallControl.java  |    6 +-
 .../apache/lucene/index/TestPointValues.java    |    3 +-
 .../apache/lucene/util/TestByteBlockPool.java   |    8 +-
 .../apache/lucene/util/TestIntroSelector.java   |   86 ++
 .../apache/lucene/util/TestRadixSelector.java   |   77 +
 .../util/bkd/TestMutablePointsReaderUtils.java  |  251 +++
 lucene/ivy-versions.properties                  |    1 +
 .../apache/lucene/index/memory/MemoryIndex.java |   24 +-
 .../lucene/index/memory/TestMemoryIndex.java    |   14 +
 .../valuesource/ComparisonBoolFunction.java     |  105 ++
 .../org/apache/lucene/replicator/nrt/Node.java  |   19 +-
 .../lucene/replicator/nrt/PrimaryNode.java      |    5 +
 .../lucene/document/DoubleRangeField.java       |  262 ++++
 .../apache/lucene/document/RangeFieldQuery.java |  315 ++++
 .../lucene/document/TestDoubleRangeField.java   |   67 +
 .../search/BaseRangeFieldQueryTestCase.java     |  427 +++++
 .../search/TestDoubleRangeFieldQueries.java     |  106 ++
 .../codecs/asserting/AssertingPointsFormat.java |    1 +
 solr/CHANGES.txt                                |   29 +
 .../apache/solr/hadoop/ZooKeeperInspector.java  |   21 +-
 .../solr/hadoop/MorphlineBasicMiniMRTest.java   |    2 +
 .../solr/hadoop/MorphlineGoLiveMiniMRTest.java  |    2 +
 solr/core/ivy.xml                               |    4 +
 .../solr/core/IndexDeletionPolicyWrapper.java   |   27 +-
 .../src/java/org/apache/solr/core/SolrCore.java |   36 +-
 .../core/snapshots/SolrSnapshotManager.java     |  134 ++
 .../snapshots/SolrSnapshotMetaDataManager.java  |  416 +++++
 .../solr/core/snapshots/package-info.java       |   22 +
 .../org/apache/solr/handler/IndexFetcher.java   |   16 +-
 .../apache/solr/handler/ReplicationHandler.java |   24 +-
 .../apache/solr/handler/RequestHandlerBase.java |   20 +-
 .../org/apache/solr/handler/RestoreCore.java    |   18 +-
 .../org/apache/solr/handler/SQLHandler.java     |    5 +-
 .../org/apache/solr/handler/SnapShooter.java    |   39 +-
 .../solr/handler/admin/CoreAdminHandler.java    |    9 +-
 .../solr/handler/admin/CoreAdminHandlerApi.java |    4 +-
 .../solr/handler/admin/CoreAdminOperation.java  | 1459 +++++++++---------
 .../java/org/apache/solr/search/LRUCache.java   |   34 +-
 .../apache/solr/search/ValueSourceParser.java   |   52 +
 .../function/SolrComparisonBoolFunction.java    |   58 +
 .../solr/security/AuthenticationPlugin.java     |   29 +-
 .../apache/solr/security/BasicAuthPlugin.java   |    5 +-
 .../security/DelegationTokenKerberosFilter.java |  171 ++
 .../apache/solr/security/KerberosFilter.java    |   14 +
 .../apache/solr/security/KerberosPlugin.java    |  195 ++-
 .../solr/security/PKIAuthenticationPlugin.java  |   13 +-
 .../solr/security/PrintWriterWrapper.java       |  215 +++
 .../apache/solr/servlet/SolrDispatchFilter.java |   12 +-
 .../solr/update/DirectUpdateHandler2.java       |  115 +-
 .../apache/solr/update/IndexFingerprint.java    |    2 +
 .../apache/solr/util/ConcurrentLRUCache.java    |   33 +-
 .../solr/cloud/ChaosMonkeyShardSplitTest.java   |   13 +-
 .../apache/solr/cloud/KerberosTestServices.java |  228 +++
 .../org/apache/solr/cloud/KerberosTestUtil.java |  147 --
 .../apache/solr/cloud/LeaderElectionTest.java   |    1 +
 ...utOfBoxZkACLAndCredentialsProvidersTest.java |    7 +-
 ...rriddenZkACLAndCredentialsProvidersTest.java |   71 +-
 .../org/apache/solr/cloud/OverseerTest.java     |    1 +
 .../solr/cloud/SaslZkACLProviderTest.java       |   39 +-
 .../solr/cloud/TestAuthenticationFramework.java |   10 +-
 .../cloud/TestLocalFSCloudBackupRestore.java    |    2 +
 .../cloud/TestMiniSolrCloudClusterKerberos.java |   29 +-
 .../TestSolrCloudWithDelegationTokens.java      |  405 +++++
 .../cloud/TestSolrCloudWithKerberosAlt.java     |   37 +-
 ...MParamsZkACLAndCredentialsProvidersTest.java |   25 +-
 .../solr/cloud/overseer/ZkStateWriterTest.java  |  393 ++---
 .../core/snapshots/TestSolrCoreSnapshots.java   |  419 +++++
 .../apache/solr/handler/BackupRestoreUtils.java |   37 +
 .../solr/handler/TestHdfsBackupRestoreCore.java |   46 +-
 .../solr/handler/TestReplicationHandler.java    |   20 +-
 .../apache/solr/search/QueryEqualityTest.java   |   27 +-
 .../solr/search/function/TestFunctionQuery.java |   69 +-
 ...ramDelegationTokenAuthenticationHandler.java |  109 ++
 .../solr/security/MockAuthenticationPlugin.java |   32 +-
 .../solr/update/DirectUpdateHandlerTest.java    |   48 +-
 solr/licenses/curator-recipes-2.8.0.jar.sha1    |    1 +
 solr/licenses/curator-recipes-LICENSE-ASL.txt   |  202 +++
 solr/licenses/curator-recipes-NOTICE.txt        |    5 +
 solr/solrj/ivy.xml                              |    5 +
 .../solr/client/solrj/impl/CloudSolrClient.java |   25 +-
 .../solr/client/solrj/impl/HttpSolrClient.java  |   57 +-
 .../solrj/impl/Krb5HttpClientBuilder.java       |   18 +-
 .../client/solrj/io/stream/CloudSolrStream.java |   25 +-
 .../client/solrj/io/stream/TopicStream.java     |   16 +-
 .../client/solrj/request/CoreAdminRequest.java  |   57 +
 .../solrj/request/DelegationTokenRequest.java   |  152 ++
 .../solrj/response/DelegationTokenResponse.java |  108 ++
 .../apache/solr/common/cloud/ClusterState.java  |   13 +-
 .../solr/common/cloud/ConnectionManager.java    |   15 +-
 .../common/cloud/DefaultConnectionStrategy.java |    4 +-
 .../solr/common/cloud/SaslZkACLProvider.java    |   21 +-
 .../cloud/SecurityAwareZkACLProvider.java       |   79 +
 .../apache/solr/common/cloud/SolrZkClient.java  |    2 +-
 ...ParamsAllAndReadonlyDigestZkACLProvider.java |   52 +-
 .../cloud/ZkClientConnectionStrategy.java       |    4 +-
 .../apache/solr/common/cloud/ZkStateReader.java |   21 +
 .../solr/common/params/CoreAdminParams.java     |   10 +-
 .../request/TestDelegationTokenRequest.java     |   70 +
 .../response/TestDelegationTokenResponse.java   |  138 ++
 solr/webapp/web/css/angular/cloud.css           |   14 +
 solr/webapp/web/js/angular/app.js               |    2 +-
 solr/webapp/web/js/angular/controllers/cloud.js |    5 +
 solr/webapp/web/js/angular/controllers/query.js |   10 +-
 solr/webapp/web/partials/cloud.html             |    3 +-
 131 files changed, 8224 insertions(+), 1813 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1d131592/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1d131592/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
----------------------------------------------------------------------
diff --cc solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
index d2742bc,d28957c..00b18fa
--- a/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
+++ b/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
@@@ -18,10 -18,8 +18,10 @@@ package org.apache.solr.handler
  
  import java.lang.invoke.MethodHandles;
  import java.net.URL;
 +import java.util.Collection;
- import java.util.concurrent.atomic.AtomicLong;
+ import java.util.concurrent.atomic.LongAdder;
  
 +import com.google.common.collect.ImmutableList;
  import org.apache.solr.common.SolrException;
  import org.apache.solr.common.params.SolrParams;
  import org.apache.solr.common.util.NamedList;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1d131592/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1d131592/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java
----------------------------------------------------------------------
diff --cc solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java
index 8ff170b,0000000..9173ad2
mode 100644,000000..100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java
@@@ -1,159 -1,0 +1,159 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +
 +package org.apache.solr.handler.admin;
 +
 +import java.util.Arrays;
 +import java.util.Collections;
 +import java.util.List;
 +import java.util.Locale;
 +import java.util.Map;
 +
 +import com.google.common.collect.ImmutableMap;
 +import org.apache.solr.client.solrj.SolrRequest;
 +import org.apache.solr.request.SolrQueryRequest;
 +import org.apache.solr.response.SolrQueryResponse;
 +import org.apache.solr.util.CommandOperation;
 +
 +import static org.apache.solr.client.solrj.SolrRequest.METHOD.*;
 +import static org.apache.solr.handler.admin.CoreAdminHandlerApi.EndPoint.NODEAPIS;
 +import static org.apache.solr.handler.admin.CoreAdminHandlerApi.EndPoint.NODEINVOKE;
 +import static org.apache.solr.handler.admin.CoreAdminOperation.*;
 +import static org.apache.solr.handler.admin.CoreAdminHandlerApi.EndPoint.CORES_COMMANDS;
 +import static org.apache.solr.handler.admin.CoreAdminHandlerApi.EndPoint.CORES_STATUS;
 +import static org.apache.solr.handler.admin.CoreAdminHandlerApi.EndPoint.PER_CORE_COMMANDS;
 +
 +public class CoreAdminHandlerApi extends BaseHandlerApiSupport {
 +  private final CoreAdminHandler handler;
 +
 +  public CoreAdminHandlerApi(CoreAdminHandler handler) {
 +    this.handler = handler;
 +  }
 +
 +  enum Cmd implements ApiCommand<CoreAdminHandlerApi> {
 +    CREATE(CORES_COMMANDS, POST, CREATE_OP, null, ImmutableMap.of("config", "configSet")),
 +    UNLOAD(PER_CORE_COMMANDS, POST, UNLOAD_OP, null, null),
 +    RELOAD(PER_CORE_COMMANDS, POST, RELOAD_OP, null, null),
 +    STATUS(CORES_STATUS, GET, STATUS_OP),
 +    SWAP(PER_CORE_COMMANDS, POST, SWAP_OP, null, ImmutableMap.of("other", "with")),
 +    RENAME(PER_CORE_COMMANDS, POST, RENAME_OP, null, null),
 +    MERGEINDEXES(PER_CORE_COMMANDS, POST, MERGEINDEXES_OP, null, null),
 +    SPLIT(PER_CORE_COMMANDS, POST, SPLIT_OP, null, ImmutableMap.of("split.key", "splitKey")),
 +    PREPRECOVERY(PER_CORE_COMMANDS, POST, PREPRECOVERY_OP, null, null),
 +    REQUESTRECOVERY(PER_CORE_COMMANDS, POST, REQUESTRECOVERY_OP, null, null),
 +    REQUESTSYNCSHARD(PER_CORE_COMMANDS, POST, REQUESTRECOVERY_OP, null, null),
 +    REQUESTBUFFERUPDATES(PER_CORE_COMMANDS, POST, REQUESTBUFFERUPDATES_OP, null, null),
 +    REQUESTAPPLYUPDATES(PER_CORE_COMMANDS, POST, REQUESTAPPLYUPDATES_OP, null, null),
 +    REQUESTSTATUS(PER_CORE_COMMANDS, POST, REQUESTSTATUS_OP, null, null),
 +    OVERSEEROP(NODEAPIS, POST, OVERSEEROP_OP, null, null),
 +    REJOINLEADERELECTION(NODEAPIS, POST, REJOINLEADERELECTION_OP, null, null),
 +    INVOKE(NODEINVOKE, GET, INVOKE_OP, null, null),
 +    FORCEPREPAREFORLEADERSHIP(PER_CORE_COMMANDS, POST, FORCEPREPAREFORLEADERSHIP_OP, null,
null);
 +
 +    public final String commandName;
 +    public final EndPoint endPoint;
 +    public final SolrRequest.METHOD method;
 +    public final Map<String, String> paramstoAttr;
 +    final CoreAdminOperation target;
 +
 +
 +    Cmd(EndPoint endPoint, SolrRequest.METHOD method, CoreAdminOperation target) {
 +      this.endPoint = endPoint;
 +      this.method = method;
 +      this.target = target;
 +      commandName = null;
 +      paramstoAttr = Collections.EMPTY_MAP;
 +
 +    }
 +
 +
 +    Cmd(EndPoint endPoint, SolrRequest.METHOD method, CoreAdminOperation target, String
commandName,
 +        Map<String, String> paramstoAttr) {
 +      this.commandName = commandName == null ? target.action.toString().toLowerCase(Locale.ROOT)
: commandName;
 +      this.endPoint = endPoint;
 +      this.method = method;
 +      this.target = target;
 +      this.paramstoAttr = paramstoAttr == null ? Collections.EMPTY_MAP : paramstoAttr;
 +    }
 +
 +    @Override
 +    public String getName() {
 +      return commandName;
 +    }
 +
 +    @Override
 +    public SolrRequest.METHOD getHttpMethod() {
 +      return method;
 +    }
 +
 +    @Override
 +    public V2EndPoint getEndPoint() {
 +      return endPoint;
 +    }
 +
 +    @Override
 +    public String getParamSubstitute(String param) {
 +      return paramstoAttr.containsKey(param) ? paramstoAttr.get(param) : param;
 +    }
 +  }
 +
 +
 +
 +  enum EndPoint implements V2EndPoint {
 +    CORES_STATUS("cores.Status"),
 +    CORES_COMMANDS("cores.Commands"),
 +    PER_CORE_COMMANDS("cores.core.Commands"),
 +    NODEINVOKE("node.invoke"),
 +    NODEAPIS("node.Commands")
 +    ;
 +
 +    final String specName;
 +
 +    EndPoint(String specName) {
 +      this.specName = specName;
 +    }
 +
 +    @Override
 +    public String getSpecName() {
 +      return specName;
 +    }
 +  }
 +
 +
 +  @Override
 +  protected void invokeCommand(SolrQueryRequest req, SolrQueryResponse rsp, ApiCommand command,
 +                               CommandOperation c) throws Exception {
-     ((Cmd) command).target.call(new CoreAdminHandler.CallInfo(handler, req, rsp, ((Cmd)
command).target));
++    ((Cmd) command).target.execute(new CoreAdminHandler.CallInfo(handler, req, rsp, ((Cmd)
command).target));
 +  }
 +
 +  @Override
 +  protected void invokeUrl(ApiCommand command, SolrQueryRequest req, SolrQueryResponse rsp)
throws Exception {
-     ((Cmd) command).target.call(new CoreAdminHandler.CallInfo(handler, req, rsp, ((Cmd)
command).target));
++    ((Cmd) command).target.execute(new CoreAdminHandler.CallInfo(handler, req, rsp, ((Cmd)
command).target));
 +  }
 +
 +  @Override
 +  protected List<ApiCommand> getCommands() {
 +    return Arrays.asList(Cmd.values());
 +  }
 +
 +  @Override
 +  protected List<V2EndPoint> getEndPoints() {
 +    return Arrays.asList(EndPoint.values());
 +  }
 +
 +
 +}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1d131592/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1d131592/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1d131592/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1d131592/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
----------------------------------------------------------------------


Mime
View raw message