congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
LevelDBTableFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
LevelDBTableFactory
in
co.cask.cdap.messaging.store.leveldb

Best Java code snippets using co.cask.cdap.messaging.store.leveldb.LevelDBTableFactory (Showing top 12 results out of 315)

origin: caskdata/cdap

private File getMetadataDBPath(String tableName) throws IOException {
 String fileName = String.format("%s.%s", NamespaceId.SYSTEM, tableName);
 return ensureDirExists(new File(baseDir, fileName));
}
origin: caskdata/cdap

private File getDataDBPath(String tableName, TopicId topicId, int generation) throws IOException {
 return getDataDBPath(tableName, topicId, generation, true);
}
origin: caskdata/cdap

@Override
public synchronized MetadataTable createMetadataTable() throws IOException {
 if (metadataTable != null) {
  return metadataTable;
 }
 File dbPath = getMetadataDBPath(metadataTableName);
 metadataTable = new LevelDBMetadataTable(LEVEL_DB_FACTORY.open(dbPath, dbOptions));
 LOG.info("Messaging metadata table created at {}", dbPath);
 return metadataTable;
}
origin: caskdata/cdap

@BeforeClass
public static void init() throws IOException {
 cConf = CConfiguration.create();
 cConf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath());
 tableFactory = new LevelDBTableFactory(cConf);
}
origin: caskdata/cdap

@BeforeClass
public static void init() throws IOException {
 CConfiguration cConf = CConfiguration.create();
 cConf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath());
 tableFactory = new LevelDBTableFactory(cConf);
}
origin: caskdata/cdap

private File getDataDBPath(String tableName, TopicId topicId, int generation,
              boolean ensureExists) throws IOException {
 String fileName = String.format("%s.%s.%s.%d", topicId.getNamespace(), tableName, topicId.getTopic(), generation);
 File file = new File(baseDir, fileName);
 if (ensureExists) {
  ensureDirExists(file);
 }
 return file;
}
origin: caskdata/cdap

@BeforeClass
public static void init() throws IOException {
 CConfiguration cConf = CConfiguration.create();
 cConf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath());
 tableFactory = new LevelDBTableFactory(cConf);
}
origin: co.cask.cdap/cdap-tms

@Override
public synchronized PayloadTable createPayloadTable(String tableName) throws IOException {
 if (payloadTable != null) {
  return payloadTable;
 }
 File dbPath = ensureDirExists(new File(baseDir, NamespaceId.SYSTEM.getNamespace() + "." + tableName));
 payloadTable = new LevelDBPayloadTable(LEVEL_DB_FACTORY.open(dbPath, dbOptions));
 LOG.info("Messaging payload table created at {}", dbPath);
 return payloadTable;
}
origin: caskdata/cdap

@BeforeClass
public static void init() throws IOException {
 CConfiguration cConf = CConfiguration.create();
 cConf.set(Constants.MessagingSystem.LOCAL_DATA_CLEANUP_FREQUENCY, Integer.toString(CLEANUP_PERIOD_IN_SECS));
 cConf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath());
 tableFactory = new LevelDBTableFactory(cConf);
}
origin: co.cask.cdap/cdap-tms

@Override
public synchronized MessageTable createMessageTable(String tableName) throws IOException {
 if (messageTable != null) {
  return messageTable;
 }
 File dbPath = ensureDirExists(new File(baseDir, NamespaceId.SYSTEM.getNamespace() + "." + tableName));
 messageTable = new LevelDBMessageTable(LEVEL_DB_FACTORY.open(dbPath, dbOptions));
 LOG.info("Messaging message table created at {}", dbPath);
 return messageTable;
}
origin: caskdata/cdap

@BeforeClass
public static void init() throws IOException {
 zkServer = InMemoryZKServer.builder().setDataDir(TEMP_FOLDER.newFolder()).build();
 zkServer.startAndWait();
 cConf = CConfiguration.create();
 cConf.set(Constants.Zookeeper.QUORUM, zkServer.getConnectionStr());
 cConf.setInt(Constants.Zookeeper.CFG_SESSION_TIMEOUT_MILLIS, 2000);
 cConf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath());
 cConf.set(Constants.MessagingSystem.HTTP_SERVER_BIND_ADDRESS, InetAddress.getLocalHost().getHostName());
 cConf.set(Constants.MessagingSystem.SYSTEM_TOPICS, "topic");
 cConf.setLong(Constants.MessagingSystem.HA_FENCING_DELAY_SECONDS, 0L);
 namespaceQueryAdmin = new InMemoryNamespaceAdmin();
 levelDBTableFactory = new LevelDBTableFactory(cConf);
}
origin: co.cask.cdap/cdap-tms

@Override
public synchronized MetadataTable createMetadataTable(String tableName) throws IOException {
 if (metadataTable != null) {
  return metadataTable;
 }
 File dbPath = ensureDirExists(new File(baseDir, NamespaceId.SYSTEM.getNamespace() + "." + tableName));
 metadataTable = new LevelDBMetadataTable(LEVEL_DB_FACTORY.open(dbPath, dbOptions));
 LOG.info("Messaging metadata table created at {}", dbPath);
 return metadataTable;
}
co.cask.cdap.messaging.store.leveldbLevelDBTableFactory

Javadoc

A TableFactory for creating tables used by the messaging system using the LevelDB implementation.

Most used methods

  • <init>
  • ensureDirExists
  • getDataDBPath
  • getMetadataDBPath

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • String (java.lang)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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