abstract class BaseAsyncLookupDoFn[Input, Output, Client, Future, TryWrapper] extends DoFnWithResource[Input, KV[Input, TryWrapper], Pair[Client, Cache[Input, Output]]] with Base[Future, Output]
A DoFn
that performs asynchronous lookup using the provided client. Lookup requests may
be deduplicated.
- Source
- BaseAsyncLookupDoFn.java
- Alphabetic
- By Inheritance
- BaseAsyncLookupDoFn
- Base
- DoFnWithResource
- DoFn
- HasDisplayData
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new BaseAsyncLookupDoFn(maxPendingRequests: Int, deduplicate: Boolean, cacheSupplier: CacheSupplier[Input, Output])
Create a
BaseAsyncLookupDoFn
instance.Create a
BaseAsyncLookupDoFn
instance.- maxPendingRequests
maximum number of pending requests on every cloned DoFn. This prevents runner from timing out and retrying bundles.
- deduplicate
if an attempt should be made to de-duplicate simultaneous requests for the same input
- cacheSupplier
supplier for lookup cache.
- new BaseAsyncLookupDoFn(maxPendingRequests: Int, cacheSupplier: CacheSupplier[Input, Output])
Create a
BaseAsyncLookupDoFn
instance.Create a
BaseAsyncLookupDoFn
instance. Simultaneous requests for the same input may be de-duplicated.- maxPendingRequests
maximum number of pending requests on every cloned DoFn. This prevents runner from timing out and retrying bundles.
- cacheSupplier
supplier for lookup cache.
- new BaseAsyncLookupDoFn(maxPendingRequests: Int)
Create a
BaseAsyncLookupDoFn
instance.Create a
BaseAsyncLookupDoFn
instance. Simultaneous requests for the same input may be de-duplicated.- maxPendingRequests
maximum number of pending requests on every cloned DoFn. This prevents runner from timing out and retrying bundles.
- new BaseAsyncLookupDoFn()
Type Members
- abstract class FinishBundleContext extends AnyRef
- Definition Classes
- DoFn
- abstract class OnTimerContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class OnWindowExpirationContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class ProcessContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class StartBundleContext extends AnyRef
- Definition Classes
- DoFn
- abstract class WindowedContext extends AnyRef
- Definition Classes
- DoFn
Abstract Value Members
- abstract def addCallback(future: Future, onSuccess: Function[Output, Void], onFailure: Function[Throwable, Void]): Future
- Definition Classes
- Base
- abstract def asyncLookup(client: Client, input: Input): Future
Perform asynchronous lookup.
- abstract def failure(throwable: Throwable): TryWrapper
Wrap output in a failed Try.
- abstract def getResourceType(): ResourceType
Get resource type.
Get resource type.
- Definition Classes
- DoFnWithResource
- abstract def newClient(): Client
Creates the client.
Creates the client.
- Attributes
- protected[transforms]
- abstract def success(output: Output): TryWrapper
Wrap output in a successful Try.
- abstract def waitForFutures(futures: Iterable[Future]): Unit
- Definition Classes
- Base
- abstract object FinishBundleContext
- Definition Classes
- DoFn
- abstract object ProcessContext
- Definition Classes
- DoFn
- abstract object StartBundleContext
- Definition Classes
- DoFn
- abstract object WindowedContext
- Definition Classes
- DoFn
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def closeResource(resource: Pair[Client, Cache[Input, Output]]): Unit
Close resource.
Close resource.
Default implementation closes
AutoCloseable
resource.- Definition Classes
- BaseAsyncLookupDoFn → DoFnWithResource
- Annotations
- @Override()
- def createResource(): Pair[Client, Cache[Input, Output]]
Create resource.
Create resource.
DoFnWithResource#getResourceType()
determines how many times this is called.- Definition Classes
- BaseAsyncLookupDoFn → DoFnWithResource
- Annotations
- @Override()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def finishBundle(context: FinishBundleContext): Unit
- Annotations
- @FinishBundle()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getInputTypeDescriptor(): TypeDescriptor[Input]
- Definition Classes
- DoFn
- def getOutputTypeDescriptor(): TypeDescriptor[KV[Input, TryWrapper]]
- Definition Classes
- DoFn
- def getResource(): Pair[Client, Cache[Input, Output]]
Get managed resource.
Get managed resource.
- Definition Classes
- DoFnWithResource
- Annotations
- @SuppressWarnings()
- def getResourceCache(): Cache[Input, Output]
- def getResourceClient(): Client
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def populateDisplayData(builder: Builder): Unit
- Definition Classes
- DoFnWithResource → DoFn → HasDisplayData
- Annotations
- @Override()
- def processElement(input: Input, timestamp: Instant, window: BoundedWindow, pane: PaneInfo, out: OutputReceiver[KV[Input, TryWrapper]]): Unit
- Annotations
- @SuppressWarnings() @ProcessElement()
- def setup(): Unit
- Definition Classes
- DoFnWithResource
- Annotations
- @Setup()
- def startBundle(context: StartBundleContext): Unit
- Annotations
- @StartBundle()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def teardown(): Unit
- Definition Classes
- DoFnWithResource
- Annotations
- @Teardown()
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def getAllowedTimestampSkew(): Duration
- Definition Classes
- DoFn
- Annotations
- @Deprecated
- Deprecated
- final def prepareForProcessing(): Unit
- Definition Classes
- DoFn
- Annotations
- @Deprecated
- Deprecated
- def processElement(input: Input, timestamp: Instant, out: OutputReceiver[KV[Input, TryWrapper]], window: BoundedWindow): Unit
- Annotations
- @Deprecated
- Deprecated