Class AbstractCompactionWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean checkChunkSize​(int subTaskId)  
      protected void checkChunkSizeAndMayOpenANewChunk​(org.apache.iotdb.tsfile.write.writer.TsFileIOWriter fileWriter, int subTaskId)  
      abstract void close()  
      abstract void endChunkGroup()  
      abstract void endFile()  
      abstract void endMeasurement​(int subTaskId)  
      protected void flushChunkToFileWriter​(org.apache.iotdb.tsfile.write.writer.TsFileIOWriter targetWriter, int subTaskId)  
      abstract java.util.List<org.apache.iotdb.tsfile.write.writer.TsFileIOWriter> getFileIOWriter()  
      abstract void startChunkGroup​(java.lang.String deviceId, boolean isAlign)  
      void startMeasurement​(java.util.List<org.apache.iotdb.tsfile.write.schema.IMeasurementSchema> measurementSchemaList, int subTaskId)  
      abstract void write​(long timestamp, java.lang.Object value, int subTaskId)  
      abstract void write​(org.apache.iotdb.tsfile.read.common.block.column.TimeColumn timestamps, org.apache.iotdb.tsfile.read.common.block.column.Column[] columns, int subTaskId, int batchSize)  
      protected void writeDataPoint​(java.lang.Long timestamp, java.lang.Object value, int subTaskId)  
      protected void writeRateLimit​(long bytesLength)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • subTaskNum

        protected static final int subTaskNum
      • chunkWriters

        protected org.apache.iotdb.tsfile.write.chunk.IChunkWriter[] chunkWriters
      • isAlign

        protected boolean isAlign
      • deviceId

        protected java.lang.String deviceId
      • measurementPointCountArray

        protected int[] measurementPointCountArray
    • Constructor Detail

      • AbstractCompactionWriter

        public AbstractCompactionWriter()
    • Method Detail

      • startChunkGroup

        public abstract void startChunkGroup​(java.lang.String deviceId,
                                             boolean isAlign)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • endChunkGroup

        public abstract void endChunkGroup()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • startMeasurement

        public void startMeasurement​(java.util.List<org.apache.iotdb.tsfile.write.schema.IMeasurementSchema> measurementSchemaList,
                                     int subTaskId)
      • endMeasurement

        public abstract void endMeasurement​(int subTaskId)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public abstract void write​(long timestamp,
                                   java.lang.Object value,
                                   int subTaskId)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public abstract void write​(org.apache.iotdb.tsfile.read.common.block.column.TimeColumn timestamps,
                                   org.apache.iotdb.tsfile.read.common.block.column.Column[] columns,
                                   int subTaskId,
                                   int batchSize)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • endFile

        public abstract void endFile()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public abstract void close()
                            throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException
      • writeDataPoint

        protected void writeDataPoint​(java.lang.Long timestamp,
                                      java.lang.Object value,
                                      int subTaskId)
      • flushChunkToFileWriter

        protected void flushChunkToFileWriter​(org.apache.iotdb.tsfile.write.writer.TsFileIOWriter targetWriter,
                                              int subTaskId)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • checkChunkSizeAndMayOpenANewChunk

        protected void checkChunkSizeAndMayOpenANewChunk​(org.apache.iotdb.tsfile.write.writer.TsFileIOWriter fileWriter,
                                                         int subTaskId)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • checkChunkSize

        protected boolean checkChunkSize​(int subTaskId)
      • writeRateLimit

        protected void writeRateLimit​(long bytesLength)
      • getFileIOWriter

        public abstract java.util.List<org.apache.iotdb.tsfile.write.writer.TsFileIOWriter> getFileIOWriter()