Class FromFlux

All Implemented Interfaces:
Expression, HasImports

public final class FromFlux extends AbstractParametrizedFlux
From produces a stream of tables from the specified bucket. See SPEC.

Options

  • bucket - The name of the bucket to query [string]
  • hosts - array of strings from(bucket:"telegraf", hosts:["host1", "host2"])

Example

 Flux flux = Flux.from("telegraf");

 Flux flux = Flux
      .from("telegraf", new String[]{"192.168.1.200", "192.168.1.100"})
      .last();
 
Author:
Jakub Bednar (bednar@github) (22/06/2018 10:20)
  • Constructor Details

    • FromFlux

      public FromFlux()
  • Method Details

    • operatorName

      @Nonnull protected String operatorName()
      Specified by:
      operatorName in class AbstractParametrizedFlux
      Returns:
      name of function
    • withBucket

      @Nonnull public FromFlux withBucket(@Nonnull String bucket)
      Parameters:
      bucket - Bucket name
      Returns:
      FromFlux
    • withHosts

      @Nonnull public FromFlux withHosts(@Nonnull Collection<String> hosts)
      Parameters:
      hosts - the Fluxd hosts
      Returns:
      FromFlux
    • withHosts

      @Nonnull public FromFlux withHosts(@Nonnull String[] hosts)
      Parameters:
      hosts - the Fluxd hosts
      Returns:
      FromFlux
    • withLocationNamed

      @Nonnull public Flux withLocationNamed(@Nonnull String name)
      Use a timezone based on a location name.
      Parameters:
      name - Location name as defined by InfluxDB server operating system timezone database
      Returns:
      this
    • withLocationFixed

      @Nonnull public Flux withLocationFixed(@Nonnull String offset)
      Use a location with a fixed offset.
      Parameters:
      offset - The fixed duration for the location offset. The duration is the offset from UTC time.
      Returns:
      this
    • appendActual

      public void appendActual(@Nonnull Map<String,Object> parameters, @Nonnull StringBuilder builder)
      Description copied from class: Flux
      Append actual Flux function to Flux query.
      Overrides:
      appendActual in class AbstractParametrizedFlux
      Parameters:
      parameters - named parameters for Flux query
      builder - Flux query chaing
    • collectImports

      public void collectImports(@Nonnull Set<String> collectedImports)
      Description copied from class: Flux
      Collects all imports of the flux.
      Overrides:
      collectImports in class Flux
      Parameters:
      collectedImports - a set to be filled by the used imports