Codota Logo
Descriptors$MethodDescriptor
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: apache/hbase

if (method.getService() == ClientService.getDescriptor()) {
 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);
   return;
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;
 }
}
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

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

 org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<
  org.apache.hbase.thirdparty.com.google.protobuf.Message> done) {
if (method.getService() != getDescriptor()) {
 throw new java.lang.IllegalArgumentException(
  "Service.callMethod() given method descriptor for wrong " +
  "service type.");
switch(method.getIndex()) {
 case 0:
  this.getRegionInfo(controller, (org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoRequest)request,
origin: apache/hbase

public final org.apache.hbase.thirdparty.com.google.protobuf.Message
  getResponsePrototype(
  org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method) {
 if (method.getService() != getDescriptor()) {
  throw new java.lang.IllegalArgumentException(
   "Service.getResponsePrototype() given method " +
   "descriptor for wrong service type.");
 switch(method.getIndex()) {
  case 0:
   return org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.getDefaultInstance();
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

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

private void callMethod(final Descriptors.MethodDescriptor md, final HBaseRpcController hrc,
  final Message param, Message returnType, final User ticket, final InetSocketAddress addr,
  final RpcCallback<Message> callback) {
 final MetricsConnection.CallStats cs = MetricsConnection.newCallStats();
 cs.setStartTime(EnvironmentEdgeManager.currentTime());
 final AtomicInteger counter = concurrentCounterCache.getUnchecked(addr);
 Call call = new Call(nextCallId(), md, param, hrc.cellScanner(), returnType,
   hrc.getCallTimeout(), hrc.getPriority(), new RpcCallback<Call>() {
    @Override
    public void run(Call call) {
     counter.decrementAndGet();
     onCallFinished(call, hrc, addr, callback);
    }
   }, cs);
 ConnectionId remoteId = new ConnectionId(ticket, md.getService().getName(), addr);
 int count = counter.incrementAndGet();
 try {
  if (count > maxConcurrentCallsPerServer) {
   throw new ServerTooBusyException(addr, count);
  }
  cs.setConcurrentCallsPerServer(count);
  T connection = getConnection(remoteId);
  connection.sendRequest(call, hrc);
 } catch (Exception e) {
  call.setException(toIOE(e));
 }
}
origin: org.apache.hbase/hbase-client

if (method.getService() == ClientService.getDescriptor()) {
 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;
 default:
origin: apache/hbase

public final org.apache.hbase.thirdparty.com.google.protobuf.Message
  getRequestPrototype(
  org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method) {
 if (method.getService() != getDescriptor()) {
  throw new java.lang.IllegalArgumentException(
   "Service.getRequestPrototype() given method " +
   "descriptor for wrong service type.");
 switch(method.getIndex()) {
  case 0:
   return org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoRequest.getDefaultInstance();
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: apache/hbase

public final org.apache.hbase.thirdparty.com.google.protobuf.Message
  getRequestPrototype(
  org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method) {
 if (method.getService() != getDescriptor()) {
  throw new java.lang.IllegalArgumentException(
   "Service.getRequestPrototype() given method " +
   "descriptor for wrong service type.");
 switch(method.getIndex()) {
  case 0:
   return org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoRequest.getDefaultInstance();
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: apache/hbase

 org.apache.hbase.thirdparty.com.google.protobuf.Message request)
 throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException {
if (method.getService() != getDescriptor()) {
 throw new java.lang.IllegalArgumentException(
  "Service.callBlockingMethod() given method descriptor for " +
  "wrong service type.");
switch(method.getIndex()) {
 case 0:
  return impl.getRegionInfo(controller, (org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoRequest)request);
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: apache/hbase

 org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<
  org.apache.hbase.thirdparty.com.google.protobuf.Message> done) {
if (method.getService() != getDescriptor()) {
 throw new java.lang.IllegalArgumentException(
  "Service.callMethod() given method descriptor for wrong " +
  "service type.");
switch(method.getIndex()) {
 case 0:
  this.regionServerStartup(controller, (org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStartupRequest)request,
origin: org.apache.hbase/hbase-protocol-shaded

public final org.apache.hbase.thirdparty.com.google.protobuf.Message
  getRequestPrototype(
  org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method) {
 if (method.getService() != getDescriptor()) {
  throw new java.lang.IllegalArgumentException(
   "Service.getRequestPrototype() given method " +
   "descriptor for wrong service type.");
 }
 switch(method.getIndex()) {
  case 0:
   return org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest.getDefaultInstance();
  case 1:
   return org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatRequest.getDefaultInstance();
  default:
   throw new java.lang.AssertionError("Can't get here.");
 }
}
origin: apache/hbase

public final org.apache.hbase.thirdparty.com.google.protobuf.Message
  getResponsePrototype(
  org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method) {
 if (method.getService() != getDescriptor()) {
  throw new java.lang.IllegalArgumentException(
   "Service.getResponsePrototype() given method " +
   "descriptor for wrong service type.");
 switch(method.getIndex()) {
  case 0:
   return org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.getDefaultInstance();
org.apache.hbase.thirdparty.com.google.protobufDescriptors$MethodDescriptor

Most used methods

  • getName
  • getIndex
  • getService
  • getFullName

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • Path (java.nio.file)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collectors (java.util.stream)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now