Class: OdpsDatahub::StreamReader

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/stream_reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, table, shardId, path, schema, packId = PackType.FIRST_PACK_ID) ⇒ StreamReader

Returns a new instance of StreamReader.



32
33
34
35
36
37
38
39
40
# File 'lib/fluent/plugin/stream_reader.rb', line 32

def initialize(project, table, shardId, path, schema, packId = PackType.FIRST_PACK_ID)
  @mProject = project
  @mTable = table
  @mPath = path
  @mShardId = shardId
  @mSchema = schema
  @mPackId = packId
  @mReadMode = ReadMode.SEEK_BEGIN
end

Instance Attribute Details

#mPackIdObject (readonly)

Returns the value of attribute mPackId.



31
32
33
# File 'lib/fluent/plugin/stream_reader.rb', line 31

def mPackId
  @mPackId
end

#mPackStreamObject (readonly)

Returns the value of attribute mPackStream.



31
32
33
# File 'lib/fluent/plugin/stream_reader.rb', line 31

def mPackStream
  @mPackStream
end

#mPathObject (readonly)

Returns the value of attribute mPath.



31
32
33
# File 'lib/fluent/plugin/stream_reader.rb', line 31

def mPath
  @mPath
end

#mProjectObject (readonly)

Returns the value of attribute mProject.



31
32
33
# File 'lib/fluent/plugin/stream_reader.rb', line 31

def mProject
  @mProject
end

#mReadModeObject (readonly)

Returns the value of attribute mReadMode.



31
32
33
# File 'lib/fluent/plugin/stream_reader.rb', line 31

def mReadMode
  @mReadMode
end

#mSchemaObject (readonly)

Returns the value of attribute mSchema.



31
32
33
# File 'lib/fluent/plugin/stream_reader.rb', line 31

def mSchema
  @mSchema
end

#mShardIdObject (readonly)

Returns the value of attribute mShardId.



31
32
33
# File 'lib/fluent/plugin/stream_reader.rb', line 31

def mShardId
  @mShardId
end

#mTableObject (readonly)

Returns the value of attribute mTable.



31
32
33
# File 'lib/fluent/plugin/stream_reader.rb', line 31

def mTable
  @mTable
end

Instance Method Details

#getPackObject

TODO



49
50
51
# File 'lib/fluent/plugin/stream_reader.rb', line 49

def getPack #get cur pack stream

end

#readObject

TODO



42
43
44
45
46
47
# File 'lib/fluent/plugin/stream_reader.rb', line 42

def read #return a pack stream of this pack
  if mPackStream != nil
    mPackStream = getPack
  end

end