Tabnine Logo
MapRDBImpl
Code IndexAdd Tabnine to your IDE (free)

How to use
MapRDBImpl
in
com.mapr.db.impl

Best Java code snippets using com.mapr.db.impl.MapRDBImpl (Showing top 16 results out of 315)

origin: apache/drill

 @Override
 public Table load(final MapRDBTableCache.Key key) throws Exception {
  // getTable is already calling tableCache.get in correct user UGI context, so should be fine here.
  // key.Left is Path. key.Right is indexDesc.
  Table table = (key.indexDesc == null ? MapRDBImpl.getTable(key.path) : MapRDBImpl.getIndexTable(key.indexDesc));
  logger.debug("time {} opened the table for tablePath {} tableHandle {} index {} userName {}",
    System.nanoTime(),
    key.path == null ? "null" : key.path,
    table == null ? "null" : table,
    key.indexDesc == null ? "null" : key.indexDesc.getIndexName(),
    key.ugi.getUserName() == null ? "null" : key.ugi.getUserName());
  return table;
 }
});
origin: apache/drill

switch (functionName) {
case "equal":
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.EQUAL, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.NOT_EQUAL, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.LESS, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.LESS_OR_EQUAL, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.GREATER, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.GREATER_OR_EQUAL, fieldValue);
 break;
 cond = MapRDBImpl.newCondition().notExists(fieldPath);
 break;
origin: apache/drill

Table createOrGetTable(String tableName, int recordNum) {
 if (admin.tableExists(tableName)) {
  return MapRDBImpl.getTable(tableName);
  // admin.deleteTable(tableName);
 }
 else {
  TableDescriptor desc = new TableDescriptorImpl(new Path(tableName));
  int splits = (recordNum / SPLIT_SIZE) - (((recordNum % SPLIT_SIZE) > 1)? 0 : 1);
  String[] splitsStr = new String[splits];
  StringBuilder strBuilder = new StringBuilder("Splits:");
  for (int i = 0; i < splits; ++i) {
   splitsStr[i] = String.format("%d", (i+1)*SPLIT_SIZE);
   strBuilder.append(splitsStr[i] + ", ");
  }
  System.out.print(strBuilder.toString());
  return admin.createTable(desc, splitsStr);
 }
}
origin: apache/drill

  + " name = 'Sprint'");
final Document queryResult = MapRDBImpl.newDocument();
SingleRowListener listener = new SingleRowListener() {
 @Override
origin: apache/drill

 public Table run() throws Exception {
  if (logger.isTraceEnabled()) {
   logger.trace("Getting MaprDB Table handle for proxy user: " + UserGroupInformation.getCurrentUser());
  }
  if (tableCachingEnabled) {
   Table table = tableCache.get(new MapRDBTableCache.Key(tablePath, indexDesc));
   logger.trace("time {} get the tablePath {} tableHandle {} index {} userName {} currentUser {}",
     System.nanoTime(), tablePath == null ? "null" : tablePath,
     table == null ? "null" : table,
     indexDesc == null ? "null" : indexDesc.getIndexName(),
     userName == null ? "null" : userName,
     UserGroupInformation.getCurrentUser() == null ? "null" : UserGroupInformation.getCurrentUser());
   return table;
  } else {
   return indexDesc == null ? MapRDBImpl.getTable(tablePath) : MapRDBImpl.getIndexTable(indexDesc);
  }
 }
});
origin: apache/drill

public JsonSubScanSpec(String tableName, IndexDesc indexDesc, String regionServer,
            QueryCondition scanRangeCondition, QueryCondition userCondition,
            byte[] startRow, byte[] stopRow, String userName) {
 super(tableName, indexDesc, regionServer, startRow, stopRow, null, null, userName);
 condition = MapRDBImpl.newCondition().and();
 if (userCondition != null && !userCondition.isEmpty()) {
  condition.condition(userCondition);
 }
 if (scanRangeCondition != null && !scanRangeCondition.isEmpty()) {
  condition.condition(scanRangeCondition);
 }
 condition.close().build();
}
origin: apache/drill

table = (indexDesc == null ? MapRDBImpl.getTable(tablePath) : MapRDBImpl.getIndexTable(indexDesc));
origin: apache/drill

queryCond = MapRDBImpl.newCondition()
  .sizeOf(fieldName, STRING_TO_RELOP.get(relOp), size)
  .build();
queryCond = MapRDBImpl.newCondition();
if (functionName.equals("ojai_typeof")) {
 queryCond.typeOf(fieldName, typeValue);
final String regex = getStringArg(call.args.get(1));
if (functionName.equals("ojai_matches")) {
 queryCond = MapRDBImpl.newCondition()
   .matches(fieldName, regex);
} else {
 queryCond = MapRDBImpl.newCondition()
   .notMatches(fieldName, regex);
origin: org.apache.drill.contrib/drill-format-mapr

 @Override
 public Table load(final MapRDBTableCache.Key key) throws Exception {
  // getTable is already calling tableCache.get in correct user UGI context, so should be fine here.
  // key.Left is Path. key.Right is indexDesc.
  Table table = (key.indexDesc == null ? MapRDBImpl.getTable(key.path) : MapRDBImpl.getIndexTable(key.indexDesc));
  logger.debug("time {} opened the table for tablePath {} tableHandle {} index {} userName {}",
    System.nanoTime(),
    key.path == null ? "null" : key.path,
    table == null ? "null" : table,
    key.indexDesc == null ? "null" : key.indexDesc.getIndexName(),
    key.ugi.getUserName() == null ? "null" : key.ugi.getUserName());
  return table;
 }
});
origin: apache/drill

public void mergeScanSpec(String functionName, JsonScanSpec scanSpec) {
 if (this.condition != null && scanSpec.getCondition() != null) {
  QueryCondition newCond = MapRDBImpl.newCondition();
  switch (functionName) {
  case "booleanAnd":
   newCond.and();
   break;
  case "booleanOr":
   newCond.or();
   break;
  default:
    assert(false);
  }
  newCond.condition(this.condition)
      .condition(scanSpec.getCondition())
      .close()
      .build();
  this.condition = newCond;
 } else if (scanSpec.getCondition() != null){
  this.condition = scanSpec.getCondition();
 }
}
origin: org.apache.drill.contrib/drill-format-mapr

 public Table run() throws Exception {
  if (logger.isTraceEnabled()) {
   logger.trace("Getting MaprDB Table handle for proxy user: " + UserGroupInformation.getCurrentUser());
  }
  if (tableCachingEnabled) {
   Table table = tableCache.get(new MapRDBTableCache.Key(tablePath, indexDesc));
   logger.trace("time {} get the tablePath {} tableHandle {} index {} userName {} currentUser {}",
     System.nanoTime(), tablePath == null ? "null" : tablePath,
     table == null ? "null" : table,
     indexDesc == null ? "null" : indexDesc.getIndexName(),
     userName == null ? "null" : userName,
     UserGroupInformation.getCurrentUser() == null ? "null" : UserGroupInformation.getCurrentUser());
   return table;
  } else {
   return indexDesc == null ? MapRDBImpl.getTable(tablePath) : MapRDBImpl.getIndexTable(indexDesc);
  }
 }
});
origin: org.apache.drill.contrib/drill-format-mapr

switch (functionName) {
case "equal":
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.EQUAL, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.NOT_EQUAL, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.LESS, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.LESS_OR_EQUAL, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.GREATER, fieldValue);
 break;
 cond = MapRDBImpl.newCondition();
 setIsCondition(cond, fieldPath, Op.GREATER_OR_EQUAL, fieldValue);
 break;
 cond = MapRDBImpl.newCondition().notExists(fieldPath);
 break;
origin: org.apache.drill.contrib/drill-format-mapr

table = (indexDesc == null ? MapRDBImpl.getTable(tablePath) : MapRDBImpl.getIndexTable(indexDesc));
origin: org.apache.drill.contrib/drill-format-mapr

public JsonSubScanSpec(String tableName, IndexDesc indexDesc, String regionServer,
            QueryCondition scanRangeCondition, QueryCondition userCondition,
            byte[] startRow, byte[] stopRow, String userName) {
 super(tableName, indexDesc, regionServer, startRow, stopRow, null, null, userName);
 condition = MapRDBImpl.newCondition().and();
 if (userCondition != null && !userCondition.isEmpty()) {
  condition.condition(userCondition);
 }
 if (scanRangeCondition != null && !scanRangeCondition.isEmpty()) {
  condition.condition(scanRangeCondition);
 }
 condition.close().build();
}
origin: org.apache.drill.contrib/drill-format-mapr

queryCond = MapRDBImpl.newCondition()
  .sizeOf(fieldName, STRING_TO_RELOP.get(relOp), size)
  .build();
queryCond = MapRDBImpl.newCondition();
if (functionName.equals("ojai_typeof")) {
 queryCond.typeOf(fieldName, typeValue);
final String regex = getStringArg(call.args.get(1));
if (functionName.equals("ojai_matches")) {
 queryCond = MapRDBImpl.newCondition()
   .matches(fieldName, regex);
} else {
 queryCond = MapRDBImpl.newCondition()
   .notMatches(fieldName, regex);
origin: org.apache.drill.contrib/drill-format-mapr

public void mergeScanSpec(String functionName, JsonScanSpec scanSpec) {
 if (this.condition != null && scanSpec.getCondition() != null) {
  QueryCondition newCond = MapRDBImpl.newCondition();
  switch (functionName) {
  case "booleanAnd":
   newCond.and();
   break;
  case "booleanOr":
   newCond.or();
   break;
  default:
    assert(false);
  }
  newCond.condition(this.condition)
      .condition(scanSpec.getCondition())
      .close()
      .build();
  this.condition = newCond;
 } else if (scanSpec.getCondition() != null){
  this.condition = scanSpec.getCondition();
 }
}
com.mapr.db.implMapRDBImpl

Most used methods

  • getTable
  • getIndexTable
  • newCondition
  • newDocument

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JFileChooser (javax.swing)
  • Top plugins for WebStorm
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