LlapNodeId
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.hadoop.hive.llap.LlapNodeId(Showing top 15 results out of 315)

origin: apache/hive

public void sendTerminateFragment(final TerminateFragmentRequestProto request, final String host,
                 final int port,
                 final ExecuteRequestCallback<TerminateFragmentResponseProto> callback) {
 LlapNodeId nodeId = LlapNodeId.getInstance(host, port);
 queueRequest(new SendTerminateFragmentCallable(nodeId, request, callback));
}
origin: apache/hive

@Override
public UpdateQueryResponseProto call() throws Exception {
 ensureInfo();
 LlapNodeId nodeId = LlapNodeId.getInstance(info.amHost, info.amPluginPort);
 return getProxy(nodeId, info.amPluginToken).updateQuery(null, request);
}
origin: apache/hive

public void sendUpdateFragment(final UpdateFragmentRequestProto request, final String host,
  final int port, final ExecuteRequestCallback<UpdateFragmentResponseProto> callback) {
 LlapNodeId nodeId = LlapNodeId.getInstance(host, port);
 queueRequest(new SendUpdateFragmentCallable(nodeId, request, callback));
}
origin: apache/hive

void registerContainer(ContainerId containerId, String hostname, int port) {
 if (LOG.isDebugEnabled()) {
  LOG.debug("Registering " + containerId + " for node: " + hostname + ":" + port);
 }
 containerToNodeMap.putIfAbsent(containerId, LlapNodeId.getInstance(hostname, port));
 // nodeMap registration is not required, since there's no taskId association.
}
origin: apache/hive

 @Override
 public ProtocolType run() {
  return createProtocolImpl(getConfig(), nodeId.getHostname(),
    nodeId.getPort(), ugi, retryPolicy, socketFactory);
 }
});
origin: apache/hive

public static LlapNodeId getInstance(String hostname, int port) {
 return CACHE.getUnchecked(new LlapNodeId(hostname, port));
}
origin: apache/hive

protected LlapTaskUmbilicalProtocol createUmbilical(final AMNodeInfo amNodeInfo)
 throws IOException, InterruptedException {
 final InetSocketAddress address = NetUtils.createSocketAddrForHost(
  amNodeInfo.amNodeId.getHostname(), amNodeInfo.amNodeId.getPort());
 SecurityUtil.setTokenService(amNodeInfo.jobToken, address);
 UserGroupInformation ugi = UserGroupInformation.createRemoteUser(amNodeInfo.umbilicalUser);
 ugi.addToken(amNodeInfo.jobToken);
 return ugi.doAs(new PrivilegedExceptionAction<LlapTaskUmbilicalProtocol>() {
  @Override
  public LlapTaskUmbilicalProtocol run() throws Exception {
   return RPC
    .getProxy(LlapTaskUmbilicalProtocol.class, LlapTaskUmbilicalProtocol.versionID,
     address, UserGroupInformation.getCurrentUser(), amNodeInfo.conf,
     amNodeInfo.socketFactory, (int) (amNodeInfo.timeout));
  }
 });
}
origin: apache/hive

private AMNodeInfo getAMNodeInfo(String amHost, int amPort, QueryIdentifier queryId) {
 Map<LlapNodeId, AMNodeInfo> amNodeInfoPerQuery = knownAppMasters.get(queryId);
 if (amNodeInfoPerQuery != null) {
  LlapNodeId amNodeId = LlapNodeId.getInstance(amHost, amPort);
  return amNodeInfoPerQuery.get(amNodeId);
 }
 return null;
}
origin: apache/hive

public static QueryInfo createQueryInfo() {
 QueryIdentifier queryIdentifier = new QueryIdentifier("fake_app_id_string", 1);
 LlapNodeId nodeId = LlapNodeId.getInstance("localhost", 0);
 QueryInfo queryInfo =
   new QueryInfo(queryIdentifier, "fake_app_id_string", "fake_dag_id_string", "fake_dag_name",
     "fakeHiveQueryId", 1, "fakeUser",
     new ConcurrentHashMap<String, LlapDaemonProtocolProtos.SourceStateProto>(),
     new String[0], null, "fakeUser", null, nodeId, null, null, false);
 return queryInfo;
}
origin: apache/hive

@Override
public void serviceStart() {
 QueueLookupCallable queueDrainerCallable = new QueueLookupCallable();
 queueLookupFuture = queueLookupExecutor.submit(queueDrainerCallable);
 Futures.addCallback(queueLookupFuture, new FutureCallback<Void>() {
  @Override
  public void onSuccess(Void result) {
   LOG.info("AMReporter QueueDrainer exited");
  }
  @Override
  public void onFailure(Throwable t) {
   if (t instanceof CancellationException && isShutdown.get()) {
    LOG.info("AMReporter QueueDrainer exited as a result of a cancellation after shutdown");
   } else {
    LOG.error("AMReporter QueueDrainer exited with error", t);
    Thread.getDefaultUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), t);
   }
  }
 });
 // TODO: why is this needed? we could just save the host and port?
 nodeId = LlapNodeId.getInstance(localAddress.get().getHostName(), localAddress.get().getPort());
 LOG.info("AMReporter running with DaemonId: {}, NodeId: {}", daemonId, nodeId);
}
origin: apache/hive

@Override
public LlapNodeId getNodeId() throws InterruptedException, TimeoutException {
 ensureInfo();
 return LlapNodeId.getInstance(info.amHost, info.amPluginPort);
}
origin: apache/hive

/**
 * @param nodeId Hostname + post.
 * @param nodeToken A custom node token. If not specified, the default token is used.
 * @return the protocol client implementation for the node.
 */
protected final ProtocolType getProxy(
  final LlapNodeId nodeId, final Token<TokenType> nodeToken) {
 String hostId = getHostIdentifier(nodeId.getHostname(), nodeId.getPort());
 try {
  return hostProxies.get(hostId, new Callable<ProtocolType>() {
   @Override
   public ProtocolType call() throws Exception {
    return createProxy(nodeId, nodeToken);
   }
  });
 } catch (ExecutionException e) {
  throw new RuntimeException(e);
 }
}
origin: apache/hive

void registerTaskAttempt(ContainerId containerId, TezTaskAttemptID taskAttemptId, String host, int port) {
 if (LOG.isDebugEnabled()) {
  LOG.debug("Registering " + containerId + ", " + taskAttemptId + " for node: " + host + ":" + port);
 }
 LlapNodeId llapNodeId = LlapNodeId.getInstance(host, port);
 attemptToNodeMap.putIfAbsent(taskAttemptId, llapNodeId);
 registerContainer(containerId, host, port);
 // nodeMap registration.
 BiMap<ContainerId, TezTaskAttemptID> tmpMap = HashBiMap.create();
 BiMap<ContainerId, TezTaskAttemptID> old = nodeMap.putIfAbsent(llapNodeId, tmpMap);
 BiMap<ContainerId, TezTaskAttemptID> usedInstance;
 usedInstance = old == null ? tmpMap : old;
 synchronized(usedInstance) {
  usedInstance.put(containerId, taskAttemptId);
 }
 // Make sure to put the instance back again, in case it was removed as part of a
 // containerEnd/taskEnd invocation.
 nodeMap.putIfAbsent(llapNodeId, usedInstance);
}
origin: apache/hive

public void sendQueryComplete(final QueryCompleteRequestProto request, final String host,
               final int port,
               final ExecuteRequestCallback<QueryCompleteResponseProto> callback) {
 LlapNodeId nodeId = LlapNodeId.getInstance(host, port);
 queueRequest(new SendQueryCompleteCallable(nodeId, request, callback));
}
origin: apache/hive

public void sendSubmitWork(SubmitWorkRequestProto request, String host, int port,
            final ExecuteRequestCallback<SubmitWorkResponseProto> callback) {
 LlapNodeId nodeId = LlapNodeId.getInstance(host, port);
 queueRequest(new SubmitWorkCallable(nodeId, request, callback));
}
org.apache.hadoop.hive.llapLlapNodeId

Most used methods

  • getInstance
  • getHostname
  • getPort
  • <init>

Popular classes and methods

  • getSharedPreferences (Context)
  • startActivity (Activity)
  • getContentResolver (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • PrintStream (java.io)
    Wraps an existing OutputStream and provides convenience methods for writing common data types in a h
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)