accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [04/15] git commit: ACCUMULO-652 removed unused (and now broken) classes
Date Mon, 22 Sep 2014 20:45:02 GMT
ACCUMULO-652 removed unused (and now broken) classes

git-svn-id: https://svn.apache.org/repos/asf/accumulo/branches/ACCUMULO-652@1354476 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/80ee809a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/80ee809a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/80ee809a

Branch: refs/heads/ACCUMULO-652
Commit: 80ee809a8d3e47a4fd20b4059cbd37a9db0b5579
Parents: 3fcd07d
Author: Adam Fuchs <afuchs@apache.org>
Authored: Wed Jun 27 12:49:32 2012 +0000
Committer: Adam Fuchs <afuchs@apache.org>
Committed: Wed Jun 27 12:49:32 2012 +0000

----------------------------------------------------------------------
 .../core/security/VisibilityEvaluator.java      | 71 --------------------
 .../core/security/VisibilityInterpreter.java    | 34 ----------
 .../security/VisibilityInterpreterFactory.java  | 40 -----------
 .../core/security/VisibilityParseException.java | 34 ----------
 4 files changed, 179 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/80ee809a/core/src/main/java/org/apache/accumulo/core/security/VisibilityEvaluator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/VisibilityEvaluator.java
b/core/src/main/java/org/apache/accumulo/core/security/VisibilityEvaluator.java
deleted file mode 100644
index 62bb167..0000000
--- a/core/src/main/java/org/apache/accumulo/core/security/VisibilityEvaluator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.accumulo.core.security;
-
-import java.util.Collection;
-
-import org.apache.accumulo.core.data.ArrayByteSequence;
-import org.apache.accumulo.core.security.ColumnVisibility.Node;
-
-public class VisibilityEvaluator {
-  private Authorizations auths;
-  
-  VisibilityEvaluator(Collection<byte[]> authorizations) {
-    this.auths = new Authorizations(authorizations);
-  }
-  
-  /**
-   * The VisibilityEvaluator computes a trie from the given Authorizations, that ColumnVisibility
expressions can be evaluated against.
-   */
-  public VisibilityEvaluator(Authorizations authorizations) {
-    this.auths = authorizations;
-  }
-  
-  public Authorizations getAuthorizations() {
-    return new Authorizations(auths.getAuthorizations());
-  }
-  
-  public boolean evaluate(ColumnVisibility visibility) throws VisibilityParseException {
-    return evaluate(visibility.getExpression(), visibility.getParseTree());
-  }
-  
-  private final boolean evaluate(final byte[] expression, final Node root) throws VisibilityParseException
{
-    switch (root.type) {
-      case TERM:
-        int len = root.getTermEnd() - root.getTermStart();
-        return auths.contains(new ArrayByteSequence(expression, root.getTermStart(), len));
-      case AND:
-        if (root.children == null || root.children.size() < 2)
-          throw new VisibilityParseException("AND has less than 2 children", expression,
root.start);
-        for (Node child : root.children) {
-          if (!evaluate(expression, child))
-            return false;
-        }
-        return true;
-      case OR:
-        if (root.children == null || root.children.size() < 2)
-          throw new VisibilityParseException("OR has less than 2 children", expression, root.start);
-        for (Node child : root.children) {
-          if (evaluate(expression, child))
-            return true;
-        }
-        return false;
-      default:
-        throw new VisibilityParseException("No such node type", expression, root.start);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/80ee809a/core/src/main/java/org/apache/accumulo/core/security/VisibilityInterpreter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/VisibilityInterpreter.java
b/core/src/main/java/org/apache/accumulo/core/security/VisibilityInterpreter.java
deleted file mode 100644
index 68de07f..0000000
--- a/core/src/main/java/org/apache/accumulo/core/security/VisibilityInterpreter.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.accumulo.core.security;
-
-import java.io.Serializable;
-
-public interface VisibilityInterpreter extends Serializable {
-  public abstract String getAbbreviatedValue();
-  
-  public abstract String getFullValue();
-  
-  public abstract void merge(ColumnVisibility other, Authorizations authorizations);
-  
-  public abstract void merge(VisibilityInterpreter other);
-  
-  // Factory type method that can be used from an instance
-  public abstract VisibilityInterpreter create();
-  
-  public abstract VisibilityInterpreter create(ColumnVisibility visibility, Authorizations
authorizations);
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/80ee809a/core/src/main/java/org/apache/accumulo/core/security/VisibilityInterpreterFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/VisibilityInterpreterFactory.java
b/core/src/main/java/org/apache/accumulo/core/security/VisibilityInterpreterFactory.java
deleted file mode 100644
index 994087e..0000000
--- a/core/src/main/java/org/apache/accumulo/core/security/VisibilityInterpreterFactory.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.accumulo.core.security;
-
-
-public class VisibilityInterpreterFactory {
-  private static VisibilityInterpreter interpreter = null;
-  
-  public static VisibilityInterpreter create() {
-    if (interpreter == null) {
-      throw new IllegalStateException("ColumnVisibilityInterpreterFactory is not configured:
 Interpreter is null");
-    }
-    return interpreter.create();
-  }
-  
-  public static VisibilityInterpreter create(ColumnVisibility cv, Authorizations authorizations)
{
-    if (interpreter == null) {
-      throw new IllegalStateException("ColumnVisibilityInterpreterFactory is not configured:
 Interpreter is null");
-    }
-    return interpreter.create(cv, authorizations);
-  }
-  
-  public static void setInterpreter(VisibilityInterpreter interpreter) {
-    VisibilityInterpreterFactory.interpreter = interpreter;
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/80ee809a/core/src/main/java/org/apache/accumulo/core/security/VisibilityParseException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/VisibilityParseException.java
b/core/src/main/java/org/apache/accumulo/core/security/VisibilityParseException.java
deleted file mode 100644
index 2f46dc9..0000000
--- a/core/src/main/java/org/apache/accumulo/core/security/VisibilityParseException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.accumulo.core.security;
-
-import java.text.ParseException;
-
-public class VisibilityParseException extends ParseException {
-  private static final long serialVersionUID = 1L;
-  private String visibility;
-  
-  public VisibilityParseException(String reason, byte[] visibility, int errorOffset) {
-    super(reason, errorOffset);
-    this.visibility = new String(visibility);
-  }
-  
-  @Override
-  public String getMessage() {
-    return super.getMessage() + " in string '" + visibility + "' at position " + super.getErrorOffset();
-  }
-}


Mime
View raw message