Package org.apache.accumulo.tserver

Examples of org.apache.accumulo.tserver.Tablet$LookupResult


        if (entry != null) {
            return entry;
        }

        NFS2Client nfsClient = getNFS2Client();
        LookupResult lookupResult;
        try {
            lookupResult = nfsClient.lookup(directoryEntry.getFileHandle(), name);
        } catch (NFS2Exception e) {
            throw new IOException("Can not call the rpc method." + e.getMessage(), e);
        }
        entry = new NFS2Entry(
            (NFS2FileSystem) getFileSystem(), this, name,
            lookupResult.getFileHandle(), lookupResult.getFileAttribute());
        if (!(entry.isDirectory() || entry.isFile())) {
            return null;
        }
        tableEntry.addEntry(entry);
        return entry;
View Full Code Here


                        Set<NFS2Entry> nfsEntrySet =
                            new LinkedHashSet<NFS2Entry>(entrySet.size());

                        for (Entry entry : entrySet) {
                            LookupResult lookupResult = nfsClient.lookup(
                                directoryEntry.getFileHandle(), entry.getName());

                            NFS2Entry nfsEntry = new NFS2Entry(
                                (NFS2FileSystem) getFileSystem(),
                                NFS2Directory.this, entry.getName(), lookupResult.getFileHandle(),
                                lookupResult.getFileAttribute());

                            if (!(nfsEntry.isDirectory() || nfsEntry.isFile())) {
                                continue;
                            }
                            nfsEntrySet.add(nfsEntry);
View Full Code Here

                String t = tokenizer.nextToken();
                tokenList.add(t);
            }
            for (int i = 0; i < tokenList.size() - 1; i++) {
                String t = tokenList.get(i);
                LookupResult lookup = nfsClient.lookup(tempFileHandle, t);
                if (lookup.getFileAttribute().getType() == FileAttribute.FILE) {
                    throw new IOException("The path contains a file : " + t + '.');
                } else if (lookup.getFileAttribute().getType() == FileAttribute.DIRECTORY) {
                    tempFileHandle = lookup.getFileHandle();
                } else {
                    throw new IOException("The path contains an unknow resource: " + t +
                            ". It is not directory or file");
                }
            }
View Full Code Here

        try {
            String filePath = path.substring(exportEntry.getDirectory().length());
            StringTokenizer tokenizer = new StringTokenizer(filePath, "/");
            while (tokenizer.hasMoreElements()) {
                String t = tokenizer.nextToken();
                LookupResult lookup = nfsClient.lookup(tempFileHandle, t);
                if (lookup.getFileAttribute().getType() == FileAttribute.FILE) {
                    fileHandle = lookup.getFileHandle();
                    fileAttribute = lookup.getFileAttribute();
                    break;
                } else if (lookup.getFileAttribute().getType() == FileAttribute.DIRECTORY) {
                    tempFileHandle = lookup.getFileHandle();
                } else {
                    throw new IOException("The path contains an unknow resource: " + t +
                            ". It is not directory or file");
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.tserver.Tablet$LookupResult

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.