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.
http://wiki.apache.org/hadoop/Hive/HiveClient?action=diff&rev1=11&rev2=12

--------------------------------------------------

      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()

Mime
View raw message