Repository: incubator-blur Updated Branches: refs/heads/master ffc39d19d -> a284f5ded
Adding missing file form last commit. Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/a284f5de Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/a284f5de Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/a284f5de Branch: refs/heads/master Commit: a284f5ded1034b66a28968c0fbab32a90f5e5b57 Parents: ffc39d1 Author: Aaron McCurry <[email protected]> Authored: Wed Nov 12 23:01:16 2014 -0500 Committer: Aaron McCurry <[email protected]> Committed: Wed Nov 12 23:01:16 2014 -0500 ---------------------------------------------------------------------- .../blur/store/hdfs/IndexInputMergeUtil.java | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a284f5de/blur-store/src/main/java/org/apache/blur/store/hdfs/IndexInputMergeUtil.java ---------------------------------------------------------------------- diff --git a/blur-store/src/main/java/org/apache/blur/store/hdfs/IndexInputMergeUtil.java b/blur-store/src/main/java/org/apache/blur/store/hdfs/IndexInputMergeUtil.java new file mode 100644 index 0000000..c1cc9c5 --- /dev/null +++ b/blur-store/src/main/java/org/apache/blur/store/hdfs/IndexInputMergeUtil.java @@ -0,0 +1,36 @@ +/** + * 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.blur.store.hdfs; + +import org.apache.blur.utils.BlurConstants; + +public class IndexInputMergeUtil { + + private static boolean streamSwitch = false; + + public static boolean isMergeThread() { + if (!streamSwitch) { + return false; + } + String name = Thread.currentThread().getName(); + if (name.startsWith(BlurConstants.SHARED_MERGE_SCHEDULER_PREFIX)) { + return true; + } + return false; + } + +}
