congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TimeType
Code IndexAdd Tabnine to your IDE (free)

How to use
TimeType
in
org.apache.accumulo.core.client.admin

Best Java code snippets using org.apache.accumulo.core.client.admin.TimeType (Showing top 8 results out of 315)

origin: apache/accumulo

@Override
public void create(String tableName, NewTableConfiguration ntc)
  throws AccumuloException, AccumuloSecurityException, TableExistsException {
 checkArgument(tableName != null, "tableName is null");
 checkArgument(ntc != null, "ntc is null");
 List<ByteBuffer> args = new ArrayList<>();
 args.add(ByteBuffer.wrap(tableName.getBytes(UTF_8)));
 args.add(ByteBuffer.wrap(ntc.getTimeType().name().getBytes(UTF_8)));
 // Send info relating to initial table creation i.e, create online or offline
 args.add(ByteBuffer.wrap(ntc.getInitialTableState().name().getBytes(UTF_8)));
 // Check for possible initial splits to be added at table creation
 // Always send number of initial splits to be created, even if zero. If greater than zero,
 // add the splits to the argument List which will be used by the FATE operations.
 int numSplits = ntc.getSplits().size();
 args.add(ByteBuffer.wrap(String.valueOf(numSplits).getBytes(UTF_8)));
 if (numSplits > 0) {
  for (Text t : ntc.getSplits()) {
   args.add(TextUtil.getByteBuffer(t));
  }
 }
 Map<String,String> opts = ntc.getProperties();
 try {
  doTableFateOperation(tableName, AccumuloException.class, FateOperation.TABLE_CREATE, args,
    opts);
 } catch (TableNotFoundException e) {
  // should not happen
  throw new AssertionError(e);
 }
}
origin: apache/accumulo

TableOperation tableOp = TableOperation.CREATE;
String tableName = validateTableNameArgument(arguments.get(0), tableOp, NOT_SYSTEM);
TimeType timeType = TimeType.valueOf(ByteBufferUtil.toString(arguments.get(1)));
InitialTableState initialTableState = InitialTableState
  .valueOf(ByteBufferUtil.toString(arguments.get(2)));
origin: edu.jhuapl.accumulo/proxy-instance

public void create(String tableName, boolean versioningIter, TimeType timeType) throws AccumuloException, AccumuloSecurityException, TableExistsException {
 org.apache.accumulo.proxy.thrift.TimeType ttype = org.apache.accumulo.proxy.thrift.TimeType.valueOf(timeType.toString());
 try {
  client.createTable(token, tableName, versioningIter, ttype);
 } catch (org.apache.accumulo.proxy.thrift.TableExistsException tee) {
  throw ExceptionFactory.tableExistsException(tableName, tee);
 } catch (TException e) {
  throw ExceptionFactory.accumuloException(e);
 }
}
origin: org.apache.accumulo/accumulo-core

synchronized void addMutation(Mutation m) {
 if (m.size() == 0)
  throw new IllegalArgumentException("Can not add empty mutations");
 long now = System.currentTimeMillis();
 mutationCount++;
 for (ColumnUpdate u : m.getUpdates()) {
  Key key = new Key(m.getRow(), 0, m.getRow().length, u.getColumnFamily(), 0,
    u.getColumnFamily().length, u.getColumnQualifier(), 0, u.getColumnQualifier().length,
    u.getColumnVisibility(), 0, u.getColumnVisibility().length, u.getTimestamp());
  if (u.isDeleted())
   key.setDeleted(true);
  if (!u.hasTimestamp())
   if (timeType.equals(TimeType.LOGICAL))
    key.setTimestamp(mutationCount);
   else
    key.setTimestamp(now);
  table.put(new MockMemKey(key, mutationCount), new Value(u.getValue()));
 }
}
origin: org.apache.accumulo/accumulo-proxy

@Override
public void createTable(ByteBuffer login, String tableName, boolean versioningIter,
  org.apache.accumulo.proxy.thrift.TimeType type)
  throws org.apache.accumulo.proxy.thrift.AccumuloException,
  org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
  org.apache.accumulo.proxy.thrift.TableExistsException, TException {
 try {
  if (type == null)
   type = org.apache.accumulo.proxy.thrift.TimeType.MILLIS;
  NewTableConfiguration tConfig = new NewTableConfiguration()
    .setTimeType(TimeType.valueOf(type.toString()));
  if (!versioningIter)
   tConfig = tConfig.withoutDefaultIterators();
  getConnector(login).tableOperations().create(tableName, tConfig);
 } catch (TableExistsException e) {
  throw new org.apache.accumulo.proxy.thrift.TableExistsException(e.toString());
 } catch (Exception e) {
  handleException(e);
 }
}
origin: org.apache.accumulo/accumulo-server

checkTableName(tableName, TableOperation.CREATE);
org.apache.accumulo.core.client.admin.TimeType timeType = org.apache.accumulo.core.client.admin.TimeType.valueOf(ByteBufferUtil.toString(arguments
  .get(1)));
origin: org.apache.accumulo/accumulo-core

@Override
public void create(String tableName, NewTableConfiguration ntc)
  throws AccumuloException, AccumuloSecurityException, TableExistsException {
 checkArgument(tableName != null, "tableName is null");
 checkArgument(ntc != null, "ntc is null");
 List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)),
   ByteBuffer.wrap(ntc.getTimeType().name().getBytes(UTF_8)));
 Map<String,String> opts = ntc.getProperties();
 try {
  doTableFateOperation(tableName, AccumuloException.class, FateOperation.TABLE_CREATE, args,
    opts);
 } catch (TableNotFoundException e) {
  // should not happen
  throw new AssertionError(e);
 }
}
origin: org.apache.accumulo/accumulo-master

TableOperation tableOp = TableOperation.CREATE;
String tableName = validateTableNameArgument(arguments.get(0), tableOp, NOT_SYSTEM);
TimeType timeType = TimeType.valueOf(ByteBufferUtil.toString(arguments.get(1)));
org.apache.accumulo.core.client.adminTimeType

Javadoc

The type of ordering to use for the table's entries (default is MILLIS)

Most used methods

  • valueOf
  • equals
  • name
  • toString

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • getResourceAsStream (ClassLoader)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • 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