Package com.facebook.presto.hive

Examples of com.facebook.presto.hive.NamenodeStats


        ImmutableMap<String, List<FileStatus>> paths = ImmutableMap.<String, List<FileStatus>>builder()
                .put("/", ImmutableList.of(fileStatus("/a", true), fileStatus("/file1", false)))
                .put("/a", ImmutableList.of(fileStatus("/a/file2", false), fileStatus("/a/file3", false)))
                .build();

        AsyncRecursiveWalker walker = new AsyncRecursiveWalker(createMockFileSystem(paths), MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats());

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> listenableFuture = walker.beginWalk(new Path("/"), callback);

        Assert.assertTrue(listenableFuture.isDone());
View Full Code Here


    {
        ImmutableMap<String, List<FileStatus>> paths = ImmutableMap.<String, List<FileStatus>>builder()
                .put("/", ImmutableList.<FileStatus>of())
                .build();

        AsyncRecursiveWalker walker = new AsyncRecursiveWalker(createMockFileSystem(paths), MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats());

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> listenableFuture = walker.beginWalk(new Path("/"), callback);

        Assert.assertTrue(listenableFuture.isDone());
View Full Code Here

                .put("/.a", ImmutableList.of(fileStatus("/.a/file4", false), fileStatus("/.a/file5", false)))
                .put("/_b", ImmutableList.of(fileStatus("/_b/file6", false), fileStatus("/_b/file7", false)))
                .put("/c", ImmutableList.of(fileStatus("/c/file8", false), fileStatus("/c/.file9", false), fileStatus("/c/_file10", false)))
                .build();

        AsyncRecursiveWalker walker = new AsyncRecursiveWalker(createMockFileSystem(paths), MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats());

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> listenableFuture = walker.beginWalk(new Path("/"), callback);

        Assert.assertTrue(listenableFuture.isDone());
View Full Code Here

            public FileStatus[] listStatus(Path f)
                    throws IOException
            {
                throw new IOException();
            }
        }, MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats());

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> listenableFuture1 = walker.beginWalk(new Path("/"), callback);
        ListenableFuture<Void> listenableFuture2 = walker.beginWalk(new Path("/"), callback);
View Full Code Here

        ImmutableMap<String, List<FileStatus>> paths = ImmutableMap.<String, List<FileStatus>>builder()
                .put("/", ImmutableList.of(fileStatus("/a", true), fileStatus("/file1", false)))
                .put("/a", ImmutableList.of(fileStatus("/a/file2", false), fileStatus("/a/file3", false)))
                .build();

        AsyncWalker walker = new AsyncWalker(createMockFileSystem(paths), MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats(), true);

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> listenableFuture = walker.beginWalk(new Path("/"), callback);

        Assert.assertTrue(listenableFuture.isDone());
View Full Code Here

        ImmutableMap<String, List<FileStatus>> paths = ImmutableMap.<String, List<FileStatus>>builder()
                .put("/", ImmutableList.of(fileStatus("/a", true), fileStatus("/file1", false)))
                .put("/a", ImmutableList.of(fileStatus("/a/file2", false), fileStatus("/a/file3", false)))
                .build();

        AsyncWalker walker = new AsyncWalker(createMockFileSystem(paths), MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats(), false);

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> future = walker.beginWalk(new Path("/"), callback);

        Assert.assertTrue(future.isDone());
View Full Code Here

    {
        ImmutableMap<String, List<FileStatus>> paths = ImmutableMap.<String, List<FileStatus>>builder()
                .put("/", ImmutableList.<FileStatus>of())
                .build();

        AsyncWalker walker = new AsyncWalker(createMockFileSystem(paths), MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats(), true);

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> listenableFuture = walker.beginWalk(new Path("/"), callback);

        Assert.assertTrue(listenableFuture.isDone());
View Full Code Here

                .put("/.a", ImmutableList.of(fileStatus("/.a/file4", false), fileStatus("/.a/file5", false)))
                .put("/_b", ImmutableList.of(fileStatus("/_b/file6", false), fileStatus("/_b/file7", false)))
                .put("/c", ImmutableList.of(fileStatus("/c/file8", false), fileStatus("/c/.file9", false), fileStatus("/c/_file10", false)))
                .build();

        AsyncWalker walker = new AsyncWalker(createMockFileSystem(paths), MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats(), true);

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> listenableFuture = walker.beginWalk(new Path("/"), callback);

        Assert.assertTrue(listenableFuture.isDone());
View Full Code Here

                .put("/.a", ImmutableList.of(fileStatus("/.a/file4", false), fileStatus("/.a/file5", false)))
                .put("/_b", ImmutableList.of(fileStatus("/_b/file6", false), fileStatus("/_b/file7", false)))
                .put("/c", ImmutableList.of(fileStatus("/c/file8", false), fileStatus("/c/.file9", false), fileStatus("/c/_file10", false)))
                .build();

        AsyncWalker walker = new AsyncWalker(createMockFileSystem(paths), MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats(), false);

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> future = walker.beginWalk(new Path("/"), callback);

        Assert.assertTrue(future.isDone());
View Full Code Here

            public FileStatus[] listStatus(Path f)
                    throws IOException
            {
                throw new IOException();
            }
        }, MoreExecutors.sameThreadExecutor(), DIRECTORY_LISTER, new NamenodeStats(), true);

        MockFileStatusCallback callback = new MockFileStatusCallback();
        ListenableFuture<Void> listenableFuture1 = walker.beginWalk(new Path("/"), callback);
        ListenableFuture<Void> listenableFuture2 = walker.beginWalk(new Path("/"), callback);
View Full Code Here

TOP

Related Classes of com.facebook.presto.hive.NamenodeStats

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.