You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dl...@apache.org on 2016/05/23 18:18:33 UTC
[1/3] accumulo git commit: ACCUMULO-3470: Removed unneccesary test
Repository: accumulo
Updated Branches:
refs/heads/master 72939d04a -> cd2873f44
ACCUMULO-3470: Removed unneccesary test
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0978c7e6
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0978c7e6
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0978c7e6
Branch: refs/heads/master
Commit: 0978c7e65d5f662d1fc4387ed83fe053482d098e
Parents: 46e3a42
Author: Dave Marion <dl...@apache.org>
Authored: Mon May 23 14:16:24 2016 -0400
Committer: Dave Marion <dl...@apache.org>
Committed: Mon May 23 14:16:24 2016 -0400
----------------------------------------------------------------------
.../providers/ReadOnlyHdfsFileProviderTest.java | 248 -------------------
1 file changed, 248 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0978c7e6/start/src/test/java/org/apache/accumulo/start/classloader/vfs/providers/ReadOnlyHdfsFileProviderTest.java
----------------------------------------------------------------------
diff --git a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/providers/ReadOnlyHdfsFileProviderTest.java b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/providers/ReadOnlyHdfsFileProviderTest.java
deleted file mode 100644
index 5b69df9..0000000
--- a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/providers/ReadOnlyHdfsFileProviderTest.java
+++ /dev/null
@@ -1,248 +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.start.classloader.vfs.providers;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.accumulo.test.AccumuloDFSBase;
-import org.apache.commons.vfs2.FileObject;
-import org.apache.commons.vfs2.FileSystemException;
-import org.apache.commons.vfs2.FileType;
-import org.apache.commons.vfs2.impl.DefaultFileSystemManager;
-import org.apache.commons.vfs2.provider.hdfs.HdfsFileAttributes;
-import org.apache.commons.vfs2.provider.hdfs.HdfsFileProvider;
-import org.apache.commons.vfs2.util.RandomAccessMode;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ReadOnlyHdfsFileProviderTest extends AccumuloDFSBase {
-
- private static final String TEST_DIR1 = getHdfsUri() + "/test-dir";
- private static final Path DIR1_PATH = new Path("/test-dir");
- private static final String TEST_FILE1 = TEST_DIR1 + "/accumulo-test-1.jar";
- private static final Path FILE1_PATH = new Path(DIR1_PATH, "accumulo-test-1.jar");
-
- private DefaultFileSystemManager manager = null;
- private FileSystem hdfs = null;
-
- @Before
- public void setup() throws Exception {
- manager = new DefaultFileSystemManager();
- manager.addProvider("hdfs", new HdfsFileProvider());
- manager.init();
- this.hdfs = cluster.getFileSystem();
- }
-
- private FileObject createTestFile(FileSystem hdfs) throws IOException {
- // Create the directory
- hdfs.mkdirs(DIR1_PATH);
- FileObject dir = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(dir);
- Assert.assertTrue(dir.exists());
- Assert.assertTrue(dir.getType().equals(FileType.FOLDER));
-
- // Create the file in the directory
- hdfs.create(FILE1_PATH).close();
- FileObject f = manager.resolveFile(TEST_FILE1);
- Assert.assertNotNull(f);
- Assert.assertTrue(f.exists());
- Assert.assertTrue(f.getType().equals(FileType.FILE));
- return f;
- }
-
- @Test
- public void testInit() throws Exception {
- FileObject fo = manager.resolveFile(TEST_FILE1);
- Assert.assertNotNull(fo);
- }
-
- @Test
- public void testExistsFails() throws Exception {
- FileObject fo = manager.resolveFile(TEST_FILE1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
- }
-
- @Test
- public void testExistsSucceeds() throws Exception {
- FileObject fo = manager.resolveFile(TEST_FILE1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the file
- @SuppressWarnings("unused")
- FileObject f = createTestFile(hdfs);
-
- }
-
- @Test(expected = UnsupportedOperationException.class)
- public void testCanRenameTo() throws Exception {
- FileObject fo = createTestFile(this.hdfs);
- Assert.assertNotNull(fo);
- fo.canRenameTo(fo);
- }
-
- @Test
- public void testDoListChildren() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- FileObject dir = file.getParent();
-
- FileObject[] children = dir.getChildren();
- Assert.assertTrue(children.length == 1);
- Assert.assertTrue(children[0].getName().equals(file.getName()));
-
- }
-
- @Test
- public void testGetContentSize() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- Assert.assertEquals(0, file.getContent().getSize());
- }
-
- @Test
- public void testGetInputStream() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- file.getContent().getInputStream().close();
- }
-
- @Test
- public void testIsHidden() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- Assert.assertFalse(file.isHidden());
- }
-
- @Test
- public void testIsReadable() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- Assert.assertTrue(file.isReadable());
- }
-
- @Test
- public void testIsWritable() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- Assert.assertFalse(file.isWriteable());
- }
-
- @Test
- public void testLastModificationTime() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- Assert.assertFalse(-1 == file.getContent().getLastModifiedTime());
- }
-
- @Test
- public void testGetAttributes() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- Map<String,Object> attributes = file.getContent().getAttributes();
- Assert.assertTrue(attributes.containsKey(HdfsFileAttributes.BLOCK_SIZE.toString()));
- Assert.assertTrue(attributes.containsKey(HdfsFileAttributes.GROUP.toString()));
- Assert.assertTrue(attributes.containsKey(HdfsFileAttributes.LAST_ACCESS_TIME.toString()));
- Assert.assertTrue(attributes.containsKey(HdfsFileAttributes.LENGTH.toString()));
- Assert.assertTrue(attributes.containsKey(HdfsFileAttributes.MODIFICATION_TIME.toString()));
- Assert.assertTrue(attributes.containsKey(HdfsFileAttributes.OWNER.toString()));
- Assert.assertTrue(attributes.containsKey(HdfsFileAttributes.PERMISSIONS.toString()));
- }
-
- @Test(expected = FileSystemException.class)
- public void testRandomAccessContent() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- file.getContent().getRandomAccessContent(RandomAccessMode.READWRITE).close();
- }
-
- @Test
- public void testRandomAccessContent2() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- file.getContent().getRandomAccessContent(RandomAccessMode.READ).close();
- }
-
- @Test
- public void testEquals() throws Exception {
- FileObject fo = manager.resolveFile(TEST_DIR1);
- Assert.assertNotNull(fo);
- Assert.assertFalse(fo.exists());
-
- // Create the test file
- FileObject file = createTestFile(hdfs);
- // Get a handle to the same file
- FileObject file2 = manager.resolveFile(TEST_FILE1);
- Assert.assertEquals(file, file2);
- }
-
- @After
- public void tearDown() throws Exception {
- if (null != hdfs) {
- hdfs.delete(DIR1_PATH, true);
- hdfs.close();
- }
- manager.close();
- }
-
-}
[2/3] accumulo git commit: Merge branch '1.7' into 1.8
Posted by dl...@apache.org.
Merge branch '1.7' into 1.8
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c5d9d493
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c5d9d493
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c5d9d493
Branch: refs/heads/master
Commit: c5d9d493ecdd94bdb00dc038b1cda0f2fb1e0f2b
Parents: ea07523 0978c7e
Author: Dave Marion <dl...@apache.org>
Authored: Mon May 23 14:17:29 2016 -0400
Committer: Dave Marion <dl...@apache.org>
Committed: Mon May 23 14:17:29 2016 -0400
----------------------------------------------------------------------
.../providers/ReadOnlyHdfsFileProviderTest.java | 248 -------------------
1 file changed, 248 deletions(-)
----------------------------------------------------------------------
[3/3] accumulo git commit: Merge branch '1.8'
Posted by dl...@apache.org.
Merge branch '1.8'
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/cd2873f4
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/cd2873f4
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/cd2873f4
Branch: refs/heads/master
Commit: cd2873f44827851bf9a6579b853dbe0a0a5b91dc
Parents: 72939d0 c5d9d49
Author: Dave Marion <dl...@apache.org>
Authored: Mon May 23 14:17:46 2016 -0400
Committer: Dave Marion <dl...@apache.org>
Committed: Mon May 23 14:17:46 2016 -0400
----------------------------------------------------------------------
.../providers/ReadOnlyHdfsFileProviderTest.java | 248 -------------------
1 file changed, 248 deletions(-)
----------------------------------------------------------------------