You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "xubo245 (JIRA)" <ji...@apache.org> on 2018/04/25 07:59:00 UTC

[jira] [Created] (CARBONDATA-2400) CarbonRead has problem

xubo245 created CARBONDATA-2400:
-----------------------------------

             Summary: CarbonRead has problem
                 Key: CARBONDATA-2400
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2400
             Project: CarbonData
          Issue Type: Bug
            Reporter: xubo245


Code:
{code:java}
  val readPath = path.replace("\\", "/");

    val reader = CarbonReader
      .builder(readPath, "_temp")
      .projection(Array[String]("name", "age", "height"))
      .setAccessKey(args(0))
      .setSecretKey(args(1))
      .setEndPoint(args(2)).build


    var i = 0
    while (reader.hasNext) {
      if (i < 10) {
        val row = reader.readNextRow.asInstanceOf[Array[AnyRef]]
        println(row(0) + " " + row(1) + " " + row(2))
      }
      Thread.sleep(1000)
      i = i + 1
      println(i)
    }
    println("count: " + i)
{code}

Result:
{code:java}
robot0 0 0.0
1
robot1 1 0.5
2
robot2 2 1.0
3
robot0 0 0.0
4
robot1 1 0.5
5
robot2 2 1.0
6
robot3 3 1.5
7
robot4 4 2.0
8
robot5 5 2.5
9
robot6 6 3.0
10
11
12
13
14
15
16
17
18
{code}

The i will very big, but the data only 13 rows



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)