Tabnine Logo
TimePartitioning.getExpirationMs
Code IndexAdd Tabnine to your IDE (free)

How to use
getExpirationMs
method
in
com.google.cloud.bigquery.TimePartitioning

Best Java code snippets using com.google.cloud.bigquery.TimePartitioning.getExpirationMs (Showing top 8 results out of 315)

origin: googleapis/google-cloud-java

com.google.api.services.bigquery.model.TimePartitioning toPb() {
 com.google.api.services.bigquery.model.TimePartitioning partitioningPb =
   new com.google.api.services.bigquery.model.TimePartitioning();
 partitioningPb.setType(getType().name());
 partitioningPb.setExpirationMs(firstNonNull(getExpirationMs(), Data.NULL_LONG));
 partitioningPb.setRequirePartitionFilter(getRequirePartitionFilter());
 partitioningPb.setField(getField());
 return partitioningPb;
}
origin: googleapis/google-cloud-java

 private void compareTimePartitioning(TimePartitioning expected, TimePartitioning value) {
  assertEquals(expected, value);
  assertEquals(expected.getType(), value.getType());
  assertEquals(expected.getExpirationMs(), value.getExpirationMs());
  assertEquals(expected.getRequirePartitionFilter(), value.getRequirePartitionFilter());
  assertEquals(expected.getField(), value.getField());
  assertEquals(expected.hashCode(), value.hashCode());
  assertEquals(expected.toString(), value.toString());
 }
}
origin: googleapis/google-cloud-java

@Test
public void testOf() {
 assertEquals(TYPE, TIME_PARTITIONING.getType());
 assertEquals(EXPIRATION_MS, TIME_PARTITIONING.getExpirationMs().longValue());
 assertEquals(REQUIRE_PARTITION_FILTER, TIME_PARTITIONING.getRequirePartitionFilter());
 assertEquals(FIELD, TIME_PARTITIONING.getField());
 TimePartitioning partitioning = TimePartitioning.of(TYPE);
 assertEquals(TYPE, partitioning.getType());
 assertNull(partitioning.getExpirationMs());
}
origin: googleapis/google-cloud-java

@Test
public void testBuilder() {
 TimePartitioning partitioning = TimePartitioning.newBuilder(TYPE).build();
 assertEquals(TYPE, partitioning.getType());
 assertNull(partitioning.getExpirationMs());
 assertNull(partitioning.getRequirePartitionFilter());
 assertNull(partitioning.getField());
 partitioning = TimePartitioning.newBuilder(TYPE).setExpirationMs(100L).build();
 assertEquals(TYPE, partitioning.getType());
 assertEquals(100, (long) partitioning.getExpirationMs());
 assertNull(partitioning.getRequirePartitionFilter());
 assertNull(partitioning.getField());
}
origin: googleapis/google-cloud-java

  ((StandardTableDefinition) table.getDefinition())
    .getTimePartitioning()
    .getExpirationMs())
.isNull();
  ((StandardTableDefinition) table.getDefinition())
    .getTimePartitioning()
    .getExpirationMs())
.isEqualTo(42L);
  ((StandardTableDefinition) table.getDefinition())
    .getTimePartitioning()
    .getExpirationMs())
.isNull();
origin: com.google.cloud/google-cloud-bigquery

@Override
public boolean equals(Object o) {
 if (o == this) {
  return true;
 }
 if (o instanceof TimePartitioning) {
  TimePartitioning that = (TimePartitioning) o;
  return (this.type.equals(that.getType()))
     && ((this.expirationMs == null) ? (that.getExpirationMs() == null) : this.expirationMs.equals(that.getExpirationMs()))
     && ((this.field == null) ? (that.getField() == null) : this.field.equals(that.getField()))
     && ((this.requirePartitionFilter == null) ? (that.getRequirePartitionFilter() == null) : this.requirePartitionFilter.equals(that.getRequirePartitionFilter()));
 }
 return false;
}
origin: com.google.cloud/google-cloud-bigquery

private Builder(TimePartitioning source) {
 this.type = source.getType();
 this.expirationMs = source.getExpirationMs();
 this.field = source.getField();
 this.requirePartitionFilter = source.getRequirePartitionFilter();
}
@Override
origin: com.google.cloud/google-cloud-bigquery

com.google.api.services.bigquery.model.TimePartitioning toPb() {
 com.google.api.services.bigquery.model.TimePartitioning partitioningPb =
   new com.google.api.services.bigquery.model.TimePartitioning();
 partitioningPb.setType(getType().name());
 partitioningPb.setExpirationMs(firstNonNull(getExpirationMs(), Data.NULL_LONG));
 partitioningPb.setRequirePartitionFilter(getRequirePartitionFilter());
 partitioningPb.setField(getField());
 return partitioningPb;
}
com.google.cloud.bigqueryTimePartitioninggetExpirationMs

Javadoc

Returns the number of milliseconds for which to keep the storage for a partition. When expired, the storage for the partition is reclaimed. If null, the partion does not expire.

Popular methods of TimePartitioning

  • of
    Returns a TimePartitioning object given the time partitioning type and the partition's expiration in
  • fromPb
  • toPb
  • getField
    If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is partiti
  • getRequirePartitionFilter
    If set to true, queries over this table require a partition filter (that can be used for partition e
  • getType
    Returns the time partitioning type. Currently, the only type supported is Type#DAY, which will gener
  • newBuilder
    Returns a TimePartitioning object given the time partitioning type. Currently, the only type support
  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • CodeWhisperer alternatives
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