Class: Java::OrgApacheHadoopHdfsClient::HdfsDataInputStream

Inherits:
Object
  • Object
show all
Defined in:
lib/spark_toolkit/hadoop/hdfs/reader.rb

Instance Method Summary collapse

Instance Method Details

#read(*args) ⇒ Object



2
3
4
5
# File 'lib/spark_toolkit/hadoop/hdfs/reader.rb', line 2

def read(*args)
  @io ||= self.to_io
  @io.read(*args)
end

#readlineObject



7
8
9
10
# File 'lib/spark_toolkit/hadoop/hdfs/reader.rb', line 7

def readline
  @io ||= self.to_io
  @io.read_line
end

#readlinesObject



12
13
14
15
16
17
18
19
# File 'lib/spark_toolkit/hadoop/hdfs/reader.rb', line 12

def readlines
  lines = []
  loop do
    line = readline
    line.nil? ? break : lines << line
  end
  lines
end