Giriş
Şu satırı dahil ederiz
import com.hazelcast.sql.impl.row.JetSqlRow;
Açıklaması şöyle. Yani Processor nesneleri arasında JetSqlRow gönderilir
A row object that's sent between processors in the Jet SQL engine. It contains a fixed number of values.
Örneğin SelectProcessorSupplier, kendi yarattığı processor nesnesine mapOutputFn geçerken şöyle bir şey geçer. Burada ResultSet nesnesinden bir JetSqlRow yaratıldığı görülebilir
Processor processor = new ReadJdbcP<>( () -> dataConnection.getConnection(), (connection, parallelism, index) -> { ... // Function that executes PreparedStatement }, rs -> { // Function that consumes the ResultSet
int columnCount = rs.getMetaData().getColumnCount(); Object[] row = new Object[columnCount]; for (int j = 0; j < columnCount; j++) { Object value = rs.getObject(j + 1); row[j] = convertValue(value); } return new JetSqlRow(evalContext.getSerializationService(), row); } );
Çağrı şöyle
<init>:54, JetSqlRow (com.hazelcast.sql.impl.row) project:119, KvRowProjector (com.hazelcast.jet.sql.impl.connector.keyvalue) project:104, KvRowProjector (com.hazelcast.jet.sql.impl.connector.keyvalue) lambda$get$a3871156$1:72, RowProjectorProcessorSupplier (com.hazelcast.jet.sql.impl.connector.map) applyEx:-1, 628161370 (com.hazelcast.jet.sql.impl.connector.map.RowProjectorProcessorSupplier$$Lambda$2238) apply:49, FunctionEx (com.hazelcast.function) tryProcess:566, AbstractProcessor$FlatMapper (com.hazelcast.jet.core) tryProcess:45, TransformP (com.hazelcast.jet.impl.processor) tryProcess0:187, AbstractProcessor (com.hazelcast.jet.core) process0:602, AbstractProcessor (com.hazelcast.jet.core) process:108, AbstractProcessor (com.hazelcast.jet.core) lambda$processInbox$2f647568$2:490, ProcessorTasklet (com.hazelcast.jet.impl.execution) runEx:-1, 722072740 (com.hazelcast.jet.impl.execution.ProcessorTasklet$$Lambda$2293) run:31, RunnableEx (com.hazelcast.jet.function) doWithClassLoader:532, Util (com.hazelcast.jet.impl.util) processInbox:490, ProcessorTasklet (com.hazelcast.jet.impl.execution) stateMachineStep:341, ProcessorTasklet (com.hazelcast.jet.impl.execution) stateMachineStep:336, ProcessorTasklet (com.hazelcast.jet.impl.execution) stateMachineStep:328, ProcessorTasklet (com.hazelcast.jet.impl.execution) call:291, ProcessorTasklet (com.hazelcast.jet.impl.execution) runTasklet:404, TaskletExecutionService$CooperativeWorker (com.hazelcast.jet.impl.execution) accept:-1, 73422020 (com.hazelcast.jet.impl.execution.TaskletExecutionService$CooperativeWorker$$Lambda$1314) forEach:895, CopyOnWriteArrayList (java.util.concurrent) run:369, TaskletExecutionService$CooperativeWorker (com.hazelcast.jet.impl.execution) run:748, Thread (java.lang)
Hiç yorum yok:
Yorum Gönder