Tabnine Logo
Descriptors$MethodDescriptor.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
org.apache.hbase.thirdparty.com.google.protobuf.Descriptors$MethodDescriptor

Best Java code snippets using org.apache.hbase.thirdparty.com.google.protobuf.Descriptors$MethodDescriptor.getName (Showing top 20 results out of 315)

origin: apache/hbase

public Map<String, Long> getCallQueueCountsSummary() {
 HashMap<String, Long> callQueueMethodTotalCount = new HashMap<>();
 for(BlockingQueue<CallRunner> queue: queues) {
  for (CallRunner cr:queue) {
   RpcCall rpcCall = cr.getRpcCall();
   String method;
   if (null==rpcCall.getMethod() ||
      StringUtil.isNullOrEmpty(method = rpcCall.getMethod().getName())) {
    method = "Unknown";
   }
   callQueueMethodTotalCount.put(method, 1+callQueueMethodTotalCount.getOrDefault(method, 0L));
  }
 }
 return callQueueMethodTotalCount;
}
origin: apache/hbase

public Map<String, Long> getCallQueueSizeSummary() {
 HashMap<String, Long> callQueueMethodTotalSize = new HashMap<>();
 for(BlockingQueue<CallRunner> queue: queues) {
  for (CallRunner cr:queue) {
   RpcCall rpcCall = cr.getRpcCall();
   String method;
   if (null==rpcCall.getMethod() ||
    StringUtil.isNullOrEmpty(method = rpcCall.getMethod().getName())) {
    method = "Unknown";
   }
   long size = rpcCall.getSize();
   callQueueMethodTotalSize.put(method, size+callQueueMethodTotalSize.getOrDefault(method, 0L));
  }
 }
 return callQueueMethodTotalSize;
}
origin: apache/hbase

String methodName = (call.getMethod() != null) ? call.getMethod().getName() : "";
String traceString = serviceName + "." + methodName;
TraceUtil.createTrace(traceString);
origin: org.apache.hbase/hbase-server

@Override
public Message callBlockingMethod(MethodDescriptor md,
  org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
  Message param)
  throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException {
 com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor =
  service.getDescriptorForType().findMethodByName(md.getName());
 com.google.protobuf.Message request = service.getRequestPrototype(methodDescriptor);
 // TODO: Convert rpcController
 com.google.protobuf.Message response = null;
 try {
  response = service.callBlockingMethod(methodDescriptor, null, request);
 } catch (ServiceException e) {
  throw new org.apache.hbase.thirdparty.com.google.protobuf.ServiceException(e);
 }
 return null;// Convert 'response'.
}
origin: com.aliyun.hbase/alihbase-client

/** Update call stats for non-critical-path methods */
private void updateRpcGeneric(MethodDescriptor method, CallStats stats) {
 final String methodName = method.getService().getName() + "_" + method.getName();
 getMetric(DRTN_BASE + methodName, rpcTimers, timerFactory)
   .update(stats.getCallTimeMs(), TimeUnit.MILLISECONDS);
 getMetric(REQ_BASE + methodName, rpcHistograms, histogramFactory)
   .update(stats.getRequestSizeBytes());
 getMetric(RESP_BASE + methodName, rpcHistograms, histogramFactory)
   .update(stats.getResponseSizeBytes());
}
origin: com.aliyun.hbase/alihbase-client

@Override
public String toString() {
 return "callId: " + this.id + " methodName: " + this.md.getName() + " param {"
   + (this.param != null ? ProtobufUtil.getShortTextFormat(this.param) : "") + "}";
}
origin: org.apache.hbase/hbase-client

switch(method.getIndex()) {
case 0:
 assert "Get".equals(method.getName());
 getTracker.updateRpc(stats);
 return;
case 1:
 assert "Mutate".equals(method.getName());
 final MutationType mutationType = ((MutateRequest) param).getMutation().getMutateType();
 switch(mutationType) {
 assert "Scan".equals(method.getName());
 scanTracker.updateRpc(stats);
 return;
case 3:
 assert "BulkLoadHFile".equals(method.getName());
 assert "PrepareBulkLoad".equals(method.getName());
 assert "CleanupBulkLoad".equals(method.getName());
 assert "ExecService".equals(method.getName());
 assert "ExecRegionServerService".equals(method.getName());
 assert "Multi".equals(method.getName());
 multiTracker.updateRpc(stats);
 return;
origin: org.apache.hbase/hbase-client

static RequestHeader buildRequestHeader(Call call, CellBlockMeta cellBlockMeta) {
 RequestHeader.Builder builder = RequestHeader.newBuilder();
 builder.setCallId(call.id);
 //TODO handle htrace API change, see HBASE-18895
 /*if (call.span != null) {
  builder.setTraceInfo(RPCTInfo.newBuilder().setParentId(call.span.getSpanId())
    .setTraceId(call.span.getTracerId()));
 }*/
 builder.setMethodName(call.md.getName());
 builder.setRequestParam(call.param != null);
 if (cellBlockMeta != null) {
  builder.setCellBlockMeta(cellBlockMeta);
 }
 // Only pass priority if there is one set.
 if (call.priority != HConstants.PRIORITY_UNSET) {
  builder.setPriority(call.priority);
 }
 builder.setTimeout(call.timeout);
 return builder.build();
}
origin: org.apache.hbase/hbase-client

private void onCallFinished(Call call, HBaseRpcController hrc, InetSocketAddress addr,
  RpcCallback<Message> callback) {
 call.callStats.setCallTimeMs(EnvironmentEdgeManager.currentTime() - call.getStartTime());
 if (metrics != null) {
  metrics.updateRpc(call.md, call.param, call.callStats);
 }
 if (LOG.isTraceEnabled()) {
  LOG.trace(
   "Call: " + call.md.getName() + ", callTime: " + call.callStats.getCallTimeMs() + "ms");
 }
 if (call.error != null) {
  if (call.error instanceof RemoteException) {
   call.error.fillInStackTrace();
   hrc.setFailed(call.error);
  } else {
   hrc.setFailed(wrapException(addr, call.error));
  }
  callback.run(null);
 } else {
  hrc.setDone(call.cells);
  callback.run(call.response);
 }
}
origin: org.apache.hbase/hbase-client

@Override
public String toString() {
 return "callId: " + this.id + " methodName: " + this.md.getName() + " param {"
   + (this.param != null ? ProtobufUtil.getShortTextFormat(this.param) : "") + "}";
}
origin: org.apache.hbase/hbase-client

/** Update call stats for non-critical-path methods */
private void updateRpcGeneric(MethodDescriptor method, CallStats stats) {
 final String methodName = method.getService().getName() + "_" + method.getName();
 getMetric(DRTN_BASE + methodName, rpcTimers, timerFactory)
   .update(stats.getCallTimeMs(), TimeUnit.MILLISECONDS);
 getMetric(REQ_BASE + methodName, rpcHistograms, histogramFactory)
   .update(stats.getRequestSizeBytes());
 getMetric(RESP_BASE + methodName, rpcHistograms, histogramFactory)
   .update(stats.getResponseSizeBytes());
}
origin: apache/hbase

MethodDescriptor md = call.getMethod();
Message param = call.getParam();
status.setRPC(md.getName(), new Object[]{param},
 call.getReceiveTime());
   md.getName(), md.getName() + "(" + param.getClass().getName() + ")",
   (tooLarge ? "TooLarge" : "TooSlow"),
   status.getClient(), startTime, processingTime, qTime,
origin: apache/hbase

switch(method.getIndex()) {
 case 0:
  assert "Get".equals(method.getName());
  getTracker.updateRpc(stats);
  return;
 case 1:
  assert "Mutate".equals(method.getName());
  final MutationType mutationType = ((MutateRequest) param).getMutation().getMutateType();
  switch(mutationType) {
  assert "Scan".equals(method.getName());
  scanTracker.updateRpc(stats);
  return;
 case 3:
  assert "BulkLoadHFile".equals(method.getName());
  assert "PrepareBulkLoad".equals(method.getName());
  assert "CleanupBulkLoad".equals(method.getName());
  assert "ExecService".equals(method.getName());
  assert "ExecRegionServerService".equals(method.getName());
  assert "Multi".equals(method.getName());
  numActionsPerServerHist.update(stats.getNumActionsPerServer());
  multiTracker.updateRpc(stats);
origin: apache/hbase

private void onCallFinished(Call call, HBaseRpcController hrc, InetSocketAddress addr,
  RpcCallback<Message> callback) {
 call.callStats.setCallTimeMs(EnvironmentEdgeManager.currentTime() - call.getStartTime());
 if (metrics != null) {
  metrics.updateRpc(call.md, call.param, call.callStats);
 }
 if (LOG.isTraceEnabled()) {
  LOG.trace(
   "Call: " + call.md.getName() + ", callTime: " + call.callStats.getCallTimeMs() + "ms");
 }
 if (call.error != null) {
  if (call.error instanceof RemoteException) {
   call.error.fillInStackTrace();
   hrc.setFailed(call.error);
  } else {
   hrc.setFailed(wrapException(addr, call.error));
  }
  callback.run(null);
 } else {
  hrc.setDone(call.cells);
  callback.run(call.response);
 }
}
origin: apache/hbase

@Override
public Message callBlockingMethod(MethodDescriptor md,
  org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
  Message param)
  throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException {
 com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor =
  service.getDescriptorForType().findMethodByName(md.getName());
 com.google.protobuf.Message request = service.getRequestPrototype(methodDescriptor);
 // TODO: Convert rpcController
 com.google.protobuf.Message response = null;
 try {
  response = service.callBlockingMethod(methodDescriptor, null, request);
 } catch (ServiceException e) {
  throw new org.apache.hbase.thirdparty.com.google.protobuf.ServiceException(e);
 }
 return null;// Convert 'response'.
}
origin: apache/hbase

static RequestHeader buildRequestHeader(Call call, CellBlockMeta cellBlockMeta) {
 RequestHeader.Builder builder = RequestHeader.newBuilder();
 builder.setCallId(call.id);
 //TODO handle htrace API change, see HBASE-18895
 /*if (call.span != null) {
  builder.setTraceInfo(RPCTInfo.newBuilder().setParentId(call.span.getSpanId())
    .setTraceId(call.span.getTracerId()));
 }*/
 builder.setMethodName(call.md.getName());
 builder.setRequestParam(call.param != null);
 if (cellBlockMeta != null) {
  builder.setCellBlockMeta(cellBlockMeta);
 }
 // Only pass priority if there is one set.
 if (call.priority != HConstants.PRIORITY_UNSET) {
  builder.setPriority(call.priority);
 }
 builder.setTimeout(call.timeout);
 return builder.build();
}
origin: apache/hbase

@Override
public String toString() {
 return "callId: " + this.id + " methodName: " + this.md.getName() + " param {"
   + (this.param != null ? ProtobufUtil.getShortTextFormat(this.param) : "") + "}";
}
origin: apache/hbase

@Override
public String toShortString() {
 String serviceName = this.connection.service != null ?
   this.connection.service.getDescriptorForType().getName() : "null";
 return "callId: " + this.id + " service: " + serviceName +
   " methodName: " + ((this.md != null) ? this.md.getName() : "n/a") +
   " size: " + StringUtils.TraditionalBinaryPrefix.long2String(this.size, "", 1) +
   " connection: " + connection.toString() +
   " deadline: " + deadline;
}
origin: apache/hbase

/** Update call stats for non-critical-path methods */
private void updateRpcGeneric(MethodDescriptor method, CallStats stats) {
 final String methodName = method.getService().getName() + "_" + method.getName();
 getMetric(DRTN_BASE + methodName, rpcTimers, timerFactory)
   .update(stats.getCallTimeMs(), TimeUnit.MILLISECONDS);
 getMetric(REQ_BASE + methodName, rpcHistograms, histogramFactory)
   .update(stats.getRequestSizeBytes());
 getMetric(RESP_BASE + methodName, rpcHistograms, histogramFactory)
   .update(stats.getResponseSizeBytes());
}
origin: apache/hbase

 protected String getCallMethod(final CallRunner task) {
  RpcCall call = task.getRpcCall();
  if (call != null && call.getMethod() != null) {
   return call.getMethod().getName();
  }
  return null;
 }
}
org.apache.hbase.thirdparty.com.google.protobufDescriptors$MethodDescriptorgetName

Popular methods of Descriptors$MethodDescriptor

  • getIndex
  • getService
  • getFullName

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now