hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/HiveClient" by RadekMaciaszek
Date Wed, 09 Feb 2011 16:31:22 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/HiveClient" page has been changed by RadekMaciaszek.
The comment on this change is: Fixed python sample.


      client.execute("CREATE TABLE r(a STRING, b INT, c DOUBLE)")
      client.execute("LOAD TABLE LOCAL INPATH '/path' INTO TABLE r")
      client.execute("SELECT * FROM r")
+     while (1)
-     while (row = client.fetchOne()):
+       row = client.fetchOne()
+       if (row == None):
+         break
        print row
      client.execute("SELECT * FROM r")
      print client.fetchAll()

View raw message