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/UserGuide" by Manhee Jo
Date Tue, 19 May 2009 08:15:21 GMT
Dear Wiki user,

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

The following page has been changed by Manhee Jo:
http://wiki.apache.org/hadoop/Hive/UserGuide

------------------------------------------------------------------------------
    userid INT,
    movieid INT,
    rating INT,
-   unixtime TIMESTAMP)
+   unixtime STRING)
  ROW FORMAT DELIMITED
  FIELDS TERMINATED BY '\t'
  STORED AS TEXTFILE;
@@ -80, +80 @@

    line = line.strip()
    userid, movieid, rating, unixtime = line.split('\t')
    weekday = datetime.datetime.fromtimestamp(float(unixtime)).isoweekday()
-   print ','.join([userid, movieid, rating, str(weekday)])
+   print '\t'.join([userid, movieid, rating, str(weekday)])
  }}}
  
  Use the mapper script:

Mime
View raw message