MCPcopy Create free account
hub / github.com/apache/impala / getDbs

Method getDbs

fe/src/main/java/org/apache/impala/service/JniCatalog.java:379–394  ·  view source on GitHub ↗

Returns a list of databases matching an optional pattern. The argument is a serialized TGetDbParams object. The return type is a serialized TGetDbResult object.

(byte[] thriftGetTablesParams)

Source from the content-addressed store, hash-verified

377 * serialized TGetDbParams object. The return type is a serialized TGetDbResult object.
378 */
379 public byte[] getDbs(byte[] thriftGetTablesParams) throws ImpalaException, TException {
380 TGetDbsParams params = new TGetDbsParams();
381 JniUtil.deserializeThrift(protocolFactory_, params, thriftGetTablesParams);
382 TGetDbsResult result = new TGetDbsResult();
383 String shortDesc = "Getting databases with pattern: " + params.getPattern();
384
385 return execAndSerialize("getDbs", shortDesc, () -> {
386 List<Db> dbs = catalog_.getDbs(PatternMatcher.MATCHER_MATCH_ALL);
387 List<TDatabase> tDbs = Lists.newArrayListWithCapacity(dbs.size());
388 for (FeDb db : dbs) {
389 tDbs.add(db.toThrift());
390 }
391 result.setDbs(tDbs);
392 return result;
393 });
394 }
395
396 /**
397 * Returns a list of table names matching an optional pattern. The argument is a

Callers

nothing calls this directly

Calls 7

deserializeThriftMethod · 0.95
execAndSerializeMethod · 0.95
getDbsMethod · 0.65
toThriftMethod · 0.65
getPatternMethod · 0.45
sizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected