@Override public CredentialProvider createProvider(URI providerName, Configuration conf) throws IOException { if (SCHEME_NAME.equals(providerName.getScheme())) { return new LocalJavaKeyStoreProvider(providerName, conf); } return null; } }
@Override protected void initFileSystem(URI uri) throws IOException { super.initFileSystem(uri); try { file = new File(new URI(getPath().toString())); if (LOG.isDebugEnabled()) { LOG.debug("initialized local file as '" + file + "'."); if (file.exists()) { LOG.debug("the local file exists and is size " + file.length()); if (LOG.isTraceEnabled()) { if (file.canRead()) { LOG.trace("we can read the local file."); } if (file.canWrite()) { LOG.trace("we can write the local file."); } } } else { LOG.debug("the local file does not exist."); } } } catch (URISyntaxException e) { throw new IOException(e); } }
@Override protected void createPermissions(String perms) throws IOException { int mode = 700; try { mode = Integer.parseInt(perms, 8); } catch (NumberFormatException nfe) { throw new IOException("Invalid permissions mode provided while " + "trying to createPermissions", nfe); } permissions = modeToPosixFilePermission(mode); }
@Override protected void createPermissions(String perms) throws IOException { int mode = 700; try { mode = Integer.parseInt(perms, 8); } catch (NumberFormatException nfe) { throw new IOException("Invalid permissions mode provided while " + "trying to createPermissions", nfe); } permissions = modeToPosixFilePermission(mode); }
@Override public CredentialProvider createProvider(URI providerName, Configuration conf) throws IOException { if (SCHEME_NAME.equals(providerName.getScheme())) { return new LocalJavaKeyStoreProvider(providerName, conf); } return null; } }
@Override protected void initFileSystem(URI uri, Configuration conf) throws IOException { super.initFileSystem(uri, conf); try { file = new File(new URI(getPath().toString())); } catch (URISyntaxException e) { throw new IOException(e); } }
@Override protected void createPermissions(String perms) throws IOException { int mode = 700; try { mode = Integer.parseInt(perms, 8); } catch (NumberFormatException nfe) { throw new IOException("Invalid permissions mode provided while " + "trying to createPermissions", nfe); } permissions = modeToPosixFilePermission(mode); }
@Override public CredentialProvider createProvider(URI providerName, Configuration conf) throws IOException { if (SCHEME_NAME.equals(providerName.getScheme())) { return new LocalJavaKeyStoreProvider(providerName, conf); } return null; } }
@Override protected void initFileSystem(URI uri, Configuration conf) throws IOException { super.initFileSystem(uri, conf); try { file = new File(new URI(getPath().toString())); } catch (URISyntaxException e) { throw new IOException(e); } }
@Override protected void createPermissions(String perms) throws IOException { int mode = 700; try { mode = Integer.parseInt(perms, 8); } catch (NumberFormatException nfe) { throw new IOException("Invalid permissions mode provided while " + "trying to createPermissions", nfe); } permissions = modeToPosixFilePermission(mode); }
@Override public CredentialProvider createProvider(URI providerName, Configuration conf) throws IOException { if (SCHEME_NAME.equals(providerName.getScheme())) { return new LocalJavaKeyStoreProvider(providerName, conf); } return null; } }
@Override protected void initFileSystem(URI uri, Configuration conf) throws IOException { super.initFileSystem(uri, conf); try { file = new File(new URI(getPath().toString())); } catch (URISyntaxException e) { throw new IOException(e); } }
@Override protected void createPermissions(String perms) throws IOException { int mode = 700; try { mode = Integer.parseInt(perms, 8); } catch (NumberFormatException nfe) { throw new IOException("Invalid permissions mode provided while " + "trying to createPermissions", nfe); } permissions = modeToPosixFilePermission(mode); }
@Override public CredentialProvider createProvider(URI providerName, Configuration conf) throws IOException { if (SCHEME_NAME.equals(providerName.getScheme())) { return new LocalJavaKeyStoreProvider(providerName, conf); } return null; } }
@Override protected void initFileSystem(URI uri) throws IOException { super.initFileSystem(uri); try { file = new File(new URI(getPath().toString())); if (LOG.isDebugEnabled()) { LOG.debug("initialized local file as '" + file + "'."); if (file.exists()) { LOG.debug("the local file exists and is size " + file.length()); if (LOG.isTraceEnabled()) { if (file.canRead()) { LOG.trace("we can read the local file."); } if (file.canWrite()) { LOG.trace("we can write the local file."); } } } else { LOG.debug("the local file does not exist."); } } } catch (URISyntaxException e) { throw new IOException(e); } }