Class BatchUpsertWriter
- java.lang.Object
-
- org.apache.flink.cdc.connectors.maxcompute.writer.BatchUpsertWriter
-
- All Implemented Interfaces:
MaxComputeWriter
public class BatchUpsertWriter extends Object implements MaxComputeWriter
MaxCompute upsert writer, useUpsertSessionImplandUpsertStreamto write data. Each session corresponds to a stream.
-
-
Constructor Summary
Constructors Constructor Description BatchUpsertWriter(MaxComputeOptions options, MaxComputeWriteOptions writeOptions, SessionIdentifier sessionIdentifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit()voiddelete(com.aliyun.odps.data.ArrayRecord record)voidflush()StringgetId()SessionIdentifiergetSessionIdentifier()com.aliyun.odps.data.ArrayRecordnewElement()voidwrite(com.aliyun.odps.data.ArrayRecord record)
-
-
-
Constructor Detail
-
BatchUpsertWriter
public BatchUpsertWriter(MaxComputeOptions options, MaxComputeWriteOptions writeOptions, SessionIdentifier sessionIdentifier) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSessionIdentifier
public SessionIdentifier getSessionIdentifier()
- Specified by:
getSessionIdentifierin interfaceMaxComputeWriter
-
newElement
public com.aliyun.odps.data.ArrayRecord newElement()
- Specified by:
newElementin interfaceMaxComputeWriter
-
write
public void write(com.aliyun.odps.data.ArrayRecord record) throws IOException- Specified by:
writein interfaceMaxComputeWriter- Throws:
IOException
-
delete
public void delete(com.aliyun.odps.data.ArrayRecord record) throws IOException- Specified by:
deletein interfaceMaxComputeWriter- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceMaxComputeWriter- Throws:
IOException
-
getId
public String getId()
- Specified by:
getIdin interfaceMaxComputeWriter
-
commit
public void commit() throws IOException- Specified by:
commitin interfaceMaxComputeWriter- Throws:
IOException
-
-