@Test public void testCredentialProvider() { cp = new RangerCredentialProvider(); providers = cp.getCredentialProviders(url); if (providers != null) { assertTrue(url.equals(providers.get(0).toString())); } System.out.println("(2) Number of active Threads : " + Thread.activeCount()); listThreads(); }
List<CredentialProvider> getCredentialProviders(String url) { if (url != null) { try { Configuration conf = new Configuration(); conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, url); return CredentialProviderFactory.getProviders(conf); } catch (Exception ie) { LOG.error("Unable to get the Credential Provider from the Configuration", ie); } } return null; }
RangerCredentialProvider { List<CredentialProvider> getCredentialProviders(String url) { if (url != null) { try { Configuration conf = new Configuration(); conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, url); return CredentialProviderFactory.getProviders(conf); } catch (Exception ie) { LOG.error("Unable to get the Credential Provider from the Configuration", ie); } } return null; } }
RangerCredentialProvider { List<CredentialProvider> getCredentialProviders(String url) { if (url != null) { try { Configuration conf = new Configuration(); conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, url); return CredentialProviderFactory.getProviders(conf); } catch (Exception ie) { LOG.error("Unable to get the Credential Provider from the Configuration", ie); } } return null; } protected  RangerCredentialProvider(); }
RangerCredentialProvider { List<CredentialProvider> getCredentialProviders(String url) { if (url != null) { try { Configuration conf = new Configuration(); conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, url); return CredentialProviderFactory.getProviders(conf); } catch (Exception ie) { LOG.error("Unable to get the Credential Provider from the Configuration", ie); } } return null; } protected  RangerCredentialProvider(); static RangerCredentialProvider getInstance(); String getCredentialString(String url, String alias); }
RangerCredentialProvider { List<CredentialProvider> getCredentialProviders(String url) { if (url != null) { try { Configuration conf = new Configuration(); conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, url); return CredentialProviderFactory.getProviders(conf); } catch (Exception ie) { LOG.error("Unable to get the Credential Provider from the Configuration", ie); } } return null; } protected  RangerCredentialProvider(); static RangerCredentialProvider getInstance(); String getCredentialString(String url, String alias);  }