Author: rangadi
Date: Fri Sep 26 10:14:15 2008
New Revision: 699415
URL: http://svn.apache.org/viewvc?rev=699415&view=rev
Log:
HADOOP-4280. Fix conversions between seconds in C and milliseconds in
Java for access times for files. (Pete Wyckoff via rangadi)
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/c++/libhdfs/hdfs.c
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=699415&r1=699414&r2=699415&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Sep 26 10:14:15 2008
@@ -755,6 +755,9 @@
into the old name and deprecating it. Also update the tests to test the
new class. (cdouglas via omalley)
+ HADOOP-4280. Fix conversions between seconds in C and milliseconds in
+ Java for access times for files. (Pete Wyckoff via rangadi)
+
Release 0.18.2 - Unreleased
BUG FIXES
Modified: hadoop/core/trunk/src/c++/libhdfs/hdfs.c
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/c%2B%2B/libhdfs/hdfs.c?rev=699415&r1=699414&r2=699415&view=diff
==============================================================================
--- hadoop/core/trunk/src/c++/libhdfs/hdfs.c (original)
+++ hadoop/core/trunk/src/c++/libhdfs/hdfs.c Fri Sep 26 10:14:15 2008
@@ -1469,8 +1469,8 @@
return -2;
}
- jlong jmtime = mtime * 1000;
- jlong jatime = atime * 1000;
+ jlong jmtime = mtime * (jlong)1000;
+ jlong jatime = atime * (jlong)1000;
int ret = 0;
jthrowable jExc = NULL;
@@ -1775,7 +1775,7 @@
"FileStatus::getModificationTime");
return -1;
}
- fileInfo->mLastMod = (tTime) (jVal.j) / 1000;
+ fileInfo->mLastMod = (tTime) (jVal.j / 1000);
if (invokeMethod(env, &jVal, &jExc, INSTANCE, jStat,
HADOOP_STAT, "getAccessTime", "()J") != 0) {
@@ -1783,7 +1783,7 @@
"FileStatus::getAccessTime");
return -1;
}
- fileInfo->mLastAccess = (tTime) (jVal.j) / 1000;
+ fileInfo->mLastAccess = (tTime) (jVal.j / 1000);
if (fileInfo->mKind == kObjectKindFile) {