Package org.apache.hdt.core.hdfs

Examples of org.apache.hdt.core.hdfs.HDFSClient


      try {
        java.net.URI sUri = serverURI == null ? new java.net.URI("hdfs://server") : new java.net.URI(serverURI);
        IConfigurationElement[] elementsFor = Platform.getExtensionRegistry().getConfigurationElementsFor("org.apache.hdt.core.hdfsClient");
        for (IConfigurationElement element : elementsFor) {
          if (sUri.getScheme().equals(element.getAttribute("protocol"))) {
            HDFSClient client = (HDFSClient) element.createExecutableExtension("class");
            hdfsClientsMap.put(serverURI, new InterruptableHDFSClient(serverURI, client));
          }
        }
      } catch (URISyntaxException e) {
        throw new CoreException(new Status(IStatus.ERROR, Activator.BUNDLE_ID, "Invalid server URI", e));
View Full Code Here


  }

  private List<String> getUserAndGroupIds() {
    List<String> list = new ArrayList<String>();
    try {
      HDFSClient client = HDFSManager.INSTANCE.getClient(hdfsServerLocation);
      List<String> defaultUserAndGroupIds = client.getDefaultUserAndGroupIds();
      if (defaultUserAndGroupIds != null)
        list.addAll(defaultUserAndGroupIds);
    } catch (CoreException e) {
      logger.warn("Unable to determine default user and groups", e);
    } catch (IOException e) {
View Full Code Here

  }

  private List<String> getUserAndGroupIds() {
    List<String> list = new ArrayList<String>();
    try {
      HDFSClient client = HDFSManager.INSTANCE.getClient(hdfsServerLocation,ConfProp.PI_HADOOP_VERSION.defVal);
      List<String> defaultUserAndGroupIds = client.getDefaultUserAndGroupIds();
      if (defaultUserAndGroupIds != null)
        list.addAll(defaultUserAndGroupIds);
    } catch (CoreException e) {
      logger.warn("Unable to determine default user and groups", e);
    } catch (IOException e) {
View Full Code Here

        IConfigurationElement[] elementsFor = Platform.getExtensionRegistry().getConfigurationElementsFor("org.apache.hdt.core.hdfsClient");
        for (IConfigurationElement element : elementsFor) {
          if (sUri.getScheme().equals(element.getAttribute("protocol"))) {
            String version = element.getAttribute("protocolVersion");
            if(hdfsVersion.equalsIgnoreCase(version)){
              HDFSClient client = (HDFSClient) element.createExecutableExtension("class");
              hdfsClientsMap.put(serverURI, new InterruptableHDFSClient(serverURI, client));           
            }
          }
        }
      } catch (URISyntaxException e) {
View Full Code Here

TOP

Related Classes of org.apache.hdt.core.hdfs.HDFSClient

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.