[2/6] accumulo git commit: ACCUMULO-4067 Avoid repeatedly fetching the NetUtils#getInputStream method.
ACCUMULO-4067 Avoid repeatedly fetching the NetUtils#getInputStream method. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4eb80855 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4eb80855 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4eb80855 Branch: refs/heads/1.7 Commit: 4eb80855f7185cc143b3d43928e57e19d5d761ef Parents: 4d952ac Author: Josh Elser Authored: Fri Dec 4 16:19:51 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 16:19:51 2015 -0500 -- .../accumulo/core/util/TTimeoutTransport.java | 21 ++-- 1 file changed, 19 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/4eb80855/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java b/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java index 60ae292..1eac8be 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java +++ b/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java @@ -35,10 +35,27 @@ import com.google.common.net.HostAndPort; public class TTimeoutTransport { + private static volatile Method GET_INPUT_STREAM_METHOD = null; + + private static Method getNetUtilsInputStreamMethod() { +if (null == GET_INPUT_STREAM_METHOD) { + synchronized (TTimeoutTransport.class) { +if (null == GET_INPUT_STREAM_METHOD) { + try { +GET_INPUT_STREAM_METHOD = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); + } catch (Exception e) { +throw new RuntimeException(e); + } +} + } +} + +return GET_INPUT_STREAM_METHOD; + } + private static InputStream getInputStream(Socket socket, long timeout) { try { - Method m = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); - return (InputStream) m.invoke(null, socket, timeout); + return (InputStream) getNetUtilsInputStreamMethod().invoke(null, socket, timeout); } catch (Exception e) { throw new RuntimeException(e); }
[4/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f85717cb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f85717cb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f85717cb Branch: refs/heads/master Commit: f85717cbdbedf9d705bc2c246a2fbe684a63d336 Parents: afa475d 4eb8085 Author: Josh Elser Authored: Fri Dec 4 16:24:11 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 16:24:11 2015 -0500 -- .../accumulo/core/rpc/TTimeoutTransport.java| 21 ++-- 1 file changed, 19 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f85717cb/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java -- diff --cc core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java index 8c23555,000..400d90a mode 100644,00..100644 --- a/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java +++ b/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java @@@ -1,60 -1,0 +1,77 @@@ +/* + * 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.rpc; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.lang.reflect.Method; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketAddress; +import java.nio.channels.spi.SelectorProvider; + +import org.apache.hadoop.net.NetUtils; +import org.apache.thrift.transport.TIOStreamTransport; +import org.apache.thrift.transport.TTransport; + +import com.google.common.net.HostAndPort; + +public class TTimeoutTransport { + ++ private static volatile Method GET_INPUT_STREAM_METHOD = null; ++ ++ private static Method getNetUtilsInputStreamMethod() { ++if (null == GET_INPUT_STREAM_METHOD) { ++ synchronized (TTimeoutTransport.class) { ++if (null == GET_INPUT_STREAM_METHOD) { ++ try { ++GET_INPUT_STREAM_METHOD = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); ++ } catch (Exception e) { ++throw new RuntimeException(e); ++ } ++} ++ } ++} ++ ++return GET_INPUT_STREAM_METHOD; ++ } ++ + private static InputStream getInputStream(Socket socket, long timeout) { +try { - Method m = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); - return (InputStream) m.invoke(null, socket, timeout); ++ return (InputStream) getNetUtilsInputStreamMethod().invoke(null, socket, timeout); +} catch (Exception e) { + throw new RuntimeException(e); +} + } + + public static TTransport create(HostAndPort addr, long timeoutMillis) throws IOException { +return create(new InetSocketAddress(addr.getHostText(), addr.getPort()), timeoutMillis); + } + + public static TTransport create(SocketAddress addr, long timeoutMillis) throws IOException { +Socket socket = SelectorProvider.provider().openSocketChannel().socket(); +socket.setSoLinger(false, 0); +socket.setTcpNoDelay(true); +socket.connect(addr); +InputStream input = new BufferedInputStream(getInputStream(socket, timeoutMillis), 1024 * 10); +OutputStream output = new BufferedOutputStream(NetUtils.getOutputStream(socket, timeoutMillis), 1024 * 10); +return new TIOStreamTransport(input, output); + } +}
[1/6] accumulo git commit: ACCUMULO-4067 Avoid repeatedly fetching the NetUtils#getInputStream method.
Repository: accumulo Updated Branches: refs/heads/1.6 4d952ac07 -> 4eb80855f refs/heads/1.7 afa475dc5 -> f85717cbd refs/heads/master afd31edb7 -> a3b862d82 ACCUMULO-4067 Avoid repeatedly fetching the NetUtils#getInputStream method. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4eb80855 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4eb80855 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4eb80855 Branch: refs/heads/1.6 Commit: 4eb80855f7185cc143b3d43928e57e19d5d761ef Parents: 4d952ac Author: Josh Elser Authored: Fri Dec 4 16:19:51 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 16:19:51 2015 -0500 -- .../accumulo/core/util/TTimeoutTransport.java | 21 ++-- 1 file changed, 19 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/4eb80855/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java b/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java index 60ae292..1eac8be 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java +++ b/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java @@ -35,10 +35,27 @@ import com.google.common.net.HostAndPort; public class TTimeoutTransport { + private static volatile Method GET_INPUT_STREAM_METHOD = null; + + private static Method getNetUtilsInputStreamMethod() { +if (null == GET_INPUT_STREAM_METHOD) { + synchronized (TTimeoutTransport.class) { +if (null == GET_INPUT_STREAM_METHOD) { + try { +GET_INPUT_STREAM_METHOD = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); + } catch (Exception e) { +throw new RuntimeException(e); + } +} + } +} + +return GET_INPUT_STREAM_METHOD; + } + private static InputStream getInputStream(Socket socket, long timeout) { try { - Method m = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); - return (InputStream) m.invoke(null, socket, timeout); + return (InputStream) getNetUtilsInputStreamMethod().invoke(null, socket, timeout); } catch (Exception e) { throw new RuntimeException(e); }
[3/6] accumulo git commit: ACCUMULO-4067 Avoid repeatedly fetching the NetUtils#getInputStream method.
ACCUMULO-4067 Avoid repeatedly fetching the NetUtils#getInputStream method. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4eb80855 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4eb80855 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4eb80855 Branch: refs/heads/master Commit: 4eb80855f7185cc143b3d43928e57e19d5d761ef Parents: 4d952ac Author: Josh Elser Authored: Fri Dec 4 16:19:51 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 16:19:51 2015 -0500 -- .../accumulo/core/util/TTimeoutTransport.java | 21 ++-- 1 file changed, 19 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/4eb80855/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java b/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java index 60ae292..1eac8be 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java +++ b/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java @@ -35,10 +35,27 @@ import com.google.common.net.HostAndPort; public class TTimeoutTransport { + private static volatile Method GET_INPUT_STREAM_METHOD = null; + + private static Method getNetUtilsInputStreamMethod() { +if (null == GET_INPUT_STREAM_METHOD) { + synchronized (TTimeoutTransport.class) { +if (null == GET_INPUT_STREAM_METHOD) { + try { +GET_INPUT_STREAM_METHOD = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); + } catch (Exception e) { +throw new RuntimeException(e); + } +} + } +} + +return GET_INPUT_STREAM_METHOD; + } + private static InputStream getInputStream(Socket socket, long timeout) { try { - Method m = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); - return (InputStream) m.invoke(null, socket, timeout); + return (InputStream) getNetUtilsInputStreamMethod().invoke(null, socket, timeout); } catch (Exception e) { throw new RuntimeException(e); }
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f85717cb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f85717cb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f85717cb Branch: refs/heads/1.7 Commit: f85717cbdbedf9d705bc2c246a2fbe684a63d336 Parents: afa475d 4eb8085 Author: Josh Elser Authored: Fri Dec 4 16:24:11 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 16:24:11 2015 -0500 -- .../accumulo/core/rpc/TTimeoutTransport.java| 21 ++-- 1 file changed, 19 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f85717cb/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java -- diff --cc core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java index 8c23555,000..400d90a mode 100644,00..100644 --- a/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java +++ b/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java @@@ -1,60 -1,0 +1,77 @@@ +/* + * 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.rpc; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.lang.reflect.Method; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketAddress; +import java.nio.channels.spi.SelectorProvider; + +import org.apache.hadoop.net.NetUtils; +import org.apache.thrift.transport.TIOStreamTransport; +import org.apache.thrift.transport.TTransport; + +import com.google.common.net.HostAndPort; + +public class TTimeoutTransport { + ++ private static volatile Method GET_INPUT_STREAM_METHOD = null; ++ ++ private static Method getNetUtilsInputStreamMethod() { ++if (null == GET_INPUT_STREAM_METHOD) { ++ synchronized (TTimeoutTransport.class) { ++if (null == GET_INPUT_STREAM_METHOD) { ++ try { ++GET_INPUT_STREAM_METHOD = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); ++ } catch (Exception e) { ++throw new RuntimeException(e); ++ } ++} ++ } ++} ++ ++return GET_INPUT_STREAM_METHOD; ++ } ++ + private static InputStream getInputStream(Socket socket, long timeout) { +try { - Method m = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); - return (InputStream) m.invoke(null, socket, timeout); ++ return (InputStream) getNetUtilsInputStreamMethod().invoke(null, socket, timeout); +} catch (Exception e) { + throw new RuntimeException(e); +} + } + + public static TTransport create(HostAndPort addr, long timeoutMillis) throws IOException { +return create(new InetSocketAddress(addr.getHostText(), addr.getPort()), timeoutMillis); + } + + public static TTransport create(SocketAddress addr, long timeoutMillis) throws IOException { +Socket socket = SelectorProvider.provider().openSocketChannel().socket(); +socket.setSoLinger(false, 0); +socket.setTcpNoDelay(true); +socket.connect(addr); +InputStream input = new BufferedInputStream(getInputStream(socket, timeoutMillis), 1024 * 10); +OutputStream output = new BufferedOutputStream(NetUtils.getOutputStream(socket, timeoutMillis), 1024 * 10); +return new TIOStreamTransport(input, output); + } +}
[6/6] accumulo git commit: Merge branch '1.7'
Merge branch '1.7' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a3b862d8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a3b862d8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a3b862d8 Branch: refs/heads/master Commit: a3b862d82fff3c094e13d0302942e15cd2c55bb2 Parents: afd31ed f85717c Author: Josh Elser Authored: Fri Dec 4 16:24:17 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 16:24:17 2015 -0500 -- .../accumulo/core/rpc/TTimeoutTransport.java| 21 ++-- 1 file changed, 19 insertions(+), 2 deletions(-) --
[2/3] accumulo git commit: ACCUMULO-4071 Change ownership on bulk-import directory for Accumulo
ACCUMULO-4071 Change ownership on bulk-import directory for Accumulo When we run on a standalone (real) instance, we need to make sure that the test opens up the permissions so that Accumulo can read/write the files being imported. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/afa475dc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/afa475dc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/afa475dc Branch: refs/heads/master Commit: afa475dc58175207af6af9cef83a382d07d81500 Parents: c20996d Author: Josh Elser Authored: Fri Dec 4 14:37:18 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 14:37:18 2015 -0500 -- .../org/apache/accumulo/test/BulkImportSequentialRowsIT.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/afa475dc/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java index 19e58de..2c04607 100644 --- a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java +++ b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java @@ -27,6 +27,7 @@ import org.apache.accumulo.harness.AccumuloClusterIT; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.FsShell; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.RawLocalFileSystem; import org.apache.hadoop.io.Text; @@ -87,6 +88,9 @@ public class BulkImportSequentialRowsIT extends AccumuloClusterIT { assertTrue("Expected that " + rfile + " exists, but it does not", fs.exists(rfile)); +FsShell fsShell = new FsShell(fs.getConf()); +assertEquals("Failed to chmod " + rootPath, 0, fsShell.run(new String[] {"-chmod", "-R", "777", rootPath.toString()})); + // Add some splits to.addSplits(tableName, getSplits());
[3/3] accumulo git commit: Merge branch '1.7'
Merge branch '1.7' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/afd31edb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/afd31edb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/afd31edb Branch: refs/heads/master Commit: afd31edb7c5fa33159ab4778b04f9e8727d9ddaa Parents: 472bdd9 afa475d Author: Josh Elser Authored: Fri Dec 4 14:49:03 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 14:49:03 2015 -0500 -- .../org/apache/accumulo/test/BulkImportSequentialRowsIT.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/afd31edb/test/src/main/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java -- diff --cc test/src/main/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java index 0297c14,000..1cfd3e6 mode 100644,00..100644 --- a/test/src/main/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java +++ b/test/src/main/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java @@@ -1,108 -1,0 +1,112 @@@ +/* + * 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.test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.TreeSet; + +import org.apache.accumulo.core.client.admin.TableOperations; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.harness.AccumuloClusterHarness; +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; ++import org.apache.hadoop.fs.FsShell; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.fs.RawLocalFileSystem; +import org.apache.hadoop.io.Text; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.collect.Iterables; + +// ACCUMULO-3967 +public class BulkImportSequentialRowsIT extends AccumuloClusterHarness { + private static final Logger log = LoggerFactory.getLogger(BulkImportSequentialRowsIT.class); + + private static final long NR = 24; + private static final long NV = 42000; + + @Override + public int defaultTimeoutSeconds() { +return 60; + } + + @Override + public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { +// Need more than one tserver +cfg.setNumTservers(2); + +// use raw local file system so walogs sync and flush will work +hadoopCoreSite.set("fs.file.impl", RawLocalFileSystem.class.getName()); + } + + @Test + public void testBulkImportFailure() throws Exception { +String tableName = getUniqueNames(1)[0]; +TableOperations to = getConnector().tableOperations(); +to.create(tableName); +FileSystem fs = getFileSystem(); +Path rootPath = new Path(fs.makeQualified(getUsableDir()), getClass().getSimpleName()); +log.info("Writing to {}", rootPath); +if (fs.exists(rootPath)) { + assertTrue(fs.delete(rootPath, true)); +} +assertTrue(fs.mkdirs(rootPath)); + +Path bulk = new Path(rootPath, "bulk"); +log.info("bulk: {}", bulk); +assertTrue(fs.mkdirs(bulk)); +Path err = new Path(rootPath, "err"); +log.info("err: {}", err); + +assertTrue(fs.mkdirs(bulk)); +assertTrue(fs.mkdirs(err)); + +Path rfile = new Path(bulk, "file.rf"); + +log.info("Generating RFile {}", rfile.toUri().toString()); + +GenerateSequentialRFile.main(new String[] {"-f", rfile.toUri().toString(), "-nr", Long.toString(NR), "-nv", Long.toString(NV)}); + +assertTrue("Expected that " + rfile + " exists, but it does not", fs.exists(rfile)); + ++FsShell fsShell = new FsShell(fs.getConf()); ++assertEquals("Failed to chmod " + rootPath, 0, fsShell.run(new String[] {"-chmod", "-R", "777", rootPath.toString()})); ++ +// Add some splits +to.a
[1/3] accumulo git commit: ACCUMULO-4071 Change ownership on bulk-import directory for Accumulo
Repository: accumulo Updated Branches: refs/heads/1.7 c20996d83 -> afa475dc5 refs/heads/master 472bdd98b -> afd31edb7 ACCUMULO-4071 Change ownership on bulk-import directory for Accumulo When we run on a standalone (real) instance, we need to make sure that the test opens up the permissions so that Accumulo can read/write the files being imported. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/afa475dc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/afa475dc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/afa475dc Branch: refs/heads/1.7 Commit: afa475dc58175207af6af9cef83a382d07d81500 Parents: c20996d Author: Josh Elser Authored: Fri Dec 4 14:37:18 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 14:37:18 2015 -0500 -- .../org/apache/accumulo/test/BulkImportSequentialRowsIT.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/afa475dc/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java index 19e58de..2c04607 100644 --- a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java +++ b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java @@ -27,6 +27,7 @@ import org.apache.accumulo.harness.AccumuloClusterIT; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.FsShell; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.RawLocalFileSystem; import org.apache.hadoop.io.Text; @@ -87,6 +88,9 @@ public class BulkImportSequentialRowsIT extends AccumuloClusterIT { assertTrue("Expected that " + rfile + " exists, but it does not", fs.exists(rfile)); +FsShell fsShell = new FsShell(fs.getConf()); +assertEquals("Failed to chmod " + rootPath, 0, fsShell.run(new String[] {"-chmod", "-R", "777", rootPath.toString()})); + // Add some splits to.addSplits(tableName, getSplits());