hdfs.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. #ifndef LIBHDFS_HDFS_H
  19. #define LIBHDFS_HDFS_H
  20. #include <errno.h> /* for EINTERNAL, etc. */
  21. #include <fcntl.h> /* for O_RDONLY, O_WRONLY */
  22. #include <stdint.h> /* for uint64_t, etc. */
  23. #include <time.h> /* for time_t */
  24. #ifndef O_RDONLY
  25. #define O_RDONLY 1
  26. #endif
  27. #ifndef O_WRONLY
  28. #define O_WRONLY 2
  29. #endif
  30. #ifndef EINTERNAL
  31. #define EINTERNAL 255
  32. #endif
  33. /** All APIs set errno to meaningful values */
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. /**
  38. * Some utility decls used in libhdfs.
  39. */
  40. struct hdfsBuilder;
  41. typedef int32_t tSize; /// size of data for read/write io ops
  42. typedef time_t tTime; /// time type in seconds
  43. typedef int64_t tOffset;/// offset within the file
  44. typedef uint16_t tPort; /// port
  45. typedef enum tObjectKind {
  46. kObjectKindFile = 'F',
  47. kObjectKindDirectory = 'D',
  48. } tObjectKind;
  49. /**
  50. * The C reflection of org.apache.org.hadoop.FileSystem .
  51. */
  52. struct hdfs_internal;
  53. typedef struct hdfs_internal* hdfsFS;
  54. struct hdfsFile_internal;
  55. typedef struct hdfsFile_internal* hdfsFile;
  56. /**
  57. * Determine if a file is open for read.
  58. *
  59. * @param file The HDFS file
  60. * @return 1 if the file is open for read; 0 otherwise
  61. */
  62. int hdfsFileIsOpenForRead(hdfsFile file);
  63. /**
  64. * Determine if a file is open for write.
  65. *
  66. * @param file The HDFS file
  67. * @return 1 if the file is open for write; 0 otherwise
  68. */
  69. int hdfsFileIsOpenForWrite(hdfsFile file);
  70. /**
  71. * hdfsConnectAsUser - Connect to a hdfs file system as a specific user
  72. * Connect to the hdfs.
  73. * @param nn The NameNode. See hdfsBuilderSetNameNode for details.
  74. * @param port The port on which the server is listening.
  75. * @param user the user name (this is hadoop domain user). Or NULL is equivelant to hhdfsConnect(host, port)
  76. * @return Returns a handle to the filesystem or NULL on error.
  77. * @deprecated Use hdfsBuilderConnect instead.
  78. */
  79. hdfsFS hdfsConnectAsUser(const char* nn, tPort port, const char *user);
  80. /**
  81. * hdfsConnect - Connect to a hdfs file system.
  82. * Connect to the hdfs.
  83. * @param nn The NameNode. See hdfsBuilderSetNameNode for details.
  84. * @param port The port on which the server is listening.
  85. * @return Returns a handle to the filesystem or NULL on error.
  86. * @deprecated Use hdfsBuilderConnect instead.
  87. */
  88. hdfsFS hdfsConnect(const char* nn, tPort port);
  89. /**
  90. * hdfsConnect - Connect to an hdfs file system.
  91. *
  92. * Forces a new instance to be created
  93. *
  94. * @param nn The NameNode. See hdfsBuilderSetNameNode for details.
  95. * @param port The port on which the server is listening.
  96. * @param user The user name to use when connecting
  97. * @return Returns a handle to the filesystem or NULL on error.
  98. * @deprecated Use hdfsBuilderConnect instead.
  99. */
  100. hdfsFS hdfsConnectAsUserNewInstance(const char* nn, tPort port, const char *user );
  101. /**
  102. * hdfsConnect - Connect to an hdfs file system.
  103. *
  104. * Forces a new instance to be created
  105. *
  106. * @param nn The NameNode. See hdfsBuilderSetNameNode for details.
  107. * @param port The port on which the server is listening.
  108. * @return Returns a handle to the filesystem or NULL on error.
  109. * @deprecated Use hdfsBuilderConnect instead.
  110. */
  111. hdfsFS hdfsConnectNewInstance(const char* nn, tPort port);
  112. /**
  113. * Connect to HDFS using the parameters defined by the builder.
  114. *
  115. * The HDFS builder will be freed, whether or not the connection was
  116. * successful.
  117. *
  118. * Every successful call to hdfsBuilderConnect should be matched with a call
  119. * to hdfsDisconnect, when the hdfsFS is no longer needed.
  120. *
  121. * @param bld The HDFS builder
  122. * @return Returns a handle to the filesystem, or NULL on error.
  123. */
  124. hdfsFS hdfsBuilderConnect(struct hdfsBuilder *bld);
  125. /**
  126. * Create an HDFS builder.
  127. *
  128. * @return The HDFS builder, or NULL on error.
  129. */
  130. struct hdfsBuilder *hdfsNewBuilder(void);
  131. /**
  132. * Force the builder to always create a new instance of the FileSystem,
  133. * rather than possibly finding one in the cache.
  134. *
  135. * @param bld The HDFS builder
  136. */
  137. void hdfsBuilderSetForceNewInstance(struct hdfsBuilder *bld);
  138. /**
  139. * Set the HDFS NameNode to connect to.
  140. *
  141. * @param bld The HDFS builder
  142. * @param nn The NameNode to use.
  143. *
  144. * If the string given is 'default', the default NameNode
  145. * configuration will be used (from the XML configuration files)
  146. *
  147. * If NULL is given, a LocalFileSystem will be created.
  148. *
  149. * If the string starts with a protocol type such as file:// or
  150. * hdfs://, this protocol type will be used. If not, the
  151. * hdfs:// protocol type will be used.
  152. *
  153. * You may specify a NameNode port in the usual way by
  154. * passing a string of the format hdfs://<hostname>:<port>.
  155. * Alternately, you may set the port with
  156. * hdfsBuilderSetNameNodePort. However, you must not pass the
  157. * port in two different ways.
  158. */
  159. void hdfsBuilderSetNameNode(struct hdfsBuilder *bld, const char *nn);
  160. /**
  161. * Set the port of the HDFS NameNode to connect to.
  162. *
  163. * @param bld The HDFS builder
  164. * @param port The port.
  165. */
  166. void hdfsBuilderSetNameNodePort(struct hdfsBuilder *bld, tPort port);
  167. /**
  168. * Set the username to use when connecting to the HDFS cluster.
  169. *
  170. * @param bld The HDFS builder
  171. * @param userName The user name. The string will be shallow-copied.
  172. */
  173. void hdfsBuilderSetUserName(struct hdfsBuilder *bld, const char *userName);
  174. /**
  175. * Set the path to the Kerberos ticket cache to use when connecting to
  176. * the HDFS cluster.
  177. *
  178. * @param bld The HDFS builder
  179. * @param kerbTicketCachePath The Kerberos ticket cache path. The string
  180. * will be shallow-copied.
  181. */
  182. void hdfsBuilderSetKerbTicketCachePath(struct hdfsBuilder *bld,
  183. const char *kerbTicketCachePath);
  184. /**
  185. * Free an HDFS builder.
  186. *
  187. * It is normally not necessary to call this function since
  188. * hdfsBuilderConnect frees the builder.
  189. *
  190. * @param bld The HDFS builder
  191. */
  192. void hdfsFreeBuilder(struct hdfsBuilder *bld);
  193. /**
  194. * Set a configuration string for an HdfsBuilder.
  195. *
  196. * @param key The key to set.
  197. * @param val The value, or NULL to set no value.
  198. * This will be shallow-copied. You are responsible for
  199. * ensuring that it remains valid until the builder is
  200. * freed.
  201. *
  202. * @return 0 on success; nonzero error code otherwise.
  203. */
  204. int hdfsBuilderConfSetStr(struct hdfsBuilder *bld, const char *key,
  205. const char *val);
  206. /**
  207. * Get a configuration string.
  208. *
  209. * @param key The key to find
  210. * @param val (out param) The value. This will be set to NULL if the
  211. * key isn't found. You must free this string with
  212. * hdfsConfStrFree.
  213. *
  214. * @return 0 on success; nonzero error code otherwise.
  215. * Failure to find the key is not an error.
  216. */
  217. int hdfsConfGetStr(const char *key, char **val);
  218. /**
  219. * Get a configuration integer.
  220. *
  221. * @param key The key to find
  222. * @param val (out param) The value. This will NOT be changed if the
  223. * key isn't found.
  224. *
  225. * @return 0 on success; nonzero error code otherwise.
  226. * Failure to find the key is not an error.
  227. */
  228. int hdfsConfGetInt(const char *key, int32_t *val);
  229. /**
  230. * Free a configuration string found with hdfsConfGetStr.
  231. *
  232. * @param val A configuration string obtained from hdfsConfGetStr
  233. */
  234. void hdfsConfStrFree(char *val);
  235. /**
  236. * hdfsDisconnect - Disconnect from the hdfs file system.
  237. * Disconnect from hdfs.
  238. * @param fs The configured filesystem handle.
  239. * @return Returns 0 on success, -1 on error.
  240. * Even if there is an error, the resources associated with the
  241. * hdfsFS will be freed.
  242. */
  243. int hdfsDisconnect(hdfsFS fs);
  244. /**
  245. * hdfsOpenFile - Open a hdfs file in given mode.
  246. * @param fs The configured filesystem handle.
  247. * @param path The full path to the file.
  248. * @param flags - an | of bits/fcntl.h file flags - supported flags are O_RDONLY, O_WRONLY (meaning create or overwrite i.e., implies O_TRUNCAT),
  249. * O_WRONLY|O_APPEND. Other flags are generally ignored other than (O_RDWR || (O_EXCL & O_CREAT)) which return NULL and set errno equal ENOTSUP.
  250. * @param bufferSize Size of buffer for read/write - pass 0 if you want
  251. * to use the default configured values.
  252. * @param replication Block replication - pass 0 if you want to use
  253. * the default configured values.
  254. * @param blocksize Size of block - pass 0 if you want to use the
  255. * default configured values.
  256. * @return Returns the handle to the open file or NULL on error.
  257. */
  258. hdfsFile hdfsOpenFile(hdfsFS fs, const char* path, int flags,
  259. int bufferSize, short replication, tSize blocksize);
  260. /**
  261. * hdfsCloseFile - Close an open file.
  262. * @param fs The configured filesystem handle.
  263. * @param file The file handle.
  264. * @return Returns 0 on success, -1 on error.
  265. * On error, errno will be set appropriately.
  266. * If the hdfs file was valid, the memory associated with it will
  267. * be freed at the end of this call, even if there was an I/O
  268. * error.
  269. */
  270. int hdfsCloseFile(hdfsFS fs, hdfsFile file);
  271. /**
  272. * hdfsExists - Checks if a given path exsits on the filesystem
  273. * @param fs The configured filesystem handle.
  274. * @param path The path to look for
  275. * @return Returns 0 on success, -1 on error.
  276. */
  277. int hdfsExists(hdfsFS fs, const char *path);
  278. /**
  279. * hdfsSeek - Seek to given offset in file.
  280. * This works only for files opened in read-only mode.
  281. * @param fs The configured filesystem handle.
  282. * @param file The file handle.
  283. * @param desiredPos Offset into the file to seek into.
  284. * @return Returns 0 on success, -1 on error.
  285. */
  286. int hdfsSeek(hdfsFS fs, hdfsFile file, tOffset desiredPos);
  287. /**
  288. * hdfsTell - Get the current offset in the file, in bytes.
  289. * @param fs The configured filesystem handle.
  290. * @param file The file handle.
  291. * @return Current offset, -1 on error.
  292. */
  293. tOffset hdfsTell(hdfsFS fs, hdfsFile file);
  294. /**
  295. * hdfsRead - Read data from an open file.
  296. * @param fs The configured filesystem handle.
  297. * @param file The file handle.
  298. * @param buffer The buffer to copy read bytes into.
  299. * @param length The length of the buffer.
  300. * @return On success, a positive number indicating how many bytes
  301. * were read.
  302. * On end-of-file, 0.
  303. * On error, -1. Errno will be set to the error code.
  304. * Just like the POSIX read function, hdfsRead will return -1
  305. * and set errno to EINTR if data is temporarily unavailable,
  306. * but we are not yet at the end of the file.
  307. */
  308. tSize hdfsRead(hdfsFS fs, hdfsFile file, void* buffer, tSize length);
  309. /**
  310. * hdfsPread - Positional read of data from an open file.
  311. * @param fs The configured filesystem handle.
  312. * @param file The file handle.
  313. * @param position Position from which to read
  314. * @param buffer The buffer to copy read bytes into.
  315. * @param length The length of the buffer.
  316. * @return See hdfsRead
  317. */
  318. tSize hdfsPread(hdfsFS fs, hdfsFile file, tOffset position,
  319. void* buffer, tSize length);
  320. /**
  321. * hdfsWrite - Write data into an open file.
  322. * @param fs The configured filesystem handle.
  323. * @param file The file handle.
  324. * @param buffer The data.
  325. * @param length The no. of bytes to write.
  326. * @return Returns the number of bytes written, -1 on error.
  327. */
  328. tSize hdfsWrite(hdfsFS fs, hdfsFile file, const void* buffer,
  329. tSize length);
  330. /**
  331. * hdfsWrite - Flush the data.
  332. * @param fs The configured filesystem handle.
  333. * @param file The file handle.
  334. * @return Returns 0 on success, -1 on error.
  335. */
  336. int hdfsFlush(hdfsFS fs, hdfsFile file);
  337. /**
  338. * hdfsHFlush - Flush out the data in client's user buffer. After the
  339. * return of this call, new readers will see the data.
  340. * @param fs configured filesystem handle
  341. * @param file file handle
  342. * @return 0 on success, -1 on error and sets errno
  343. */
  344. int hdfsHFlush(hdfsFS fs, hdfsFile file);
  345. /**
  346. * hdfsAvailable - Number of bytes that can be read from this
  347. * input stream without blocking.
  348. * @param fs The configured filesystem handle.
  349. * @param file The file handle.
  350. * @return Returns available bytes; -1 on error.
  351. */
  352. int hdfsAvailable(hdfsFS fs, hdfsFile file);
  353. /**
  354. * hdfsCopy - Copy file from one filesystem to another.
  355. * @param srcFS The handle to source filesystem.
  356. * @param src The path of source file.
  357. * @param dstFS The handle to destination filesystem.
  358. * @param dst The path of destination file.
  359. * @return Returns 0 on success, -1 on error.
  360. */
  361. int hdfsCopy(hdfsFS srcFS, const char* src, hdfsFS dstFS, const char* dst);
  362. /**
  363. * hdfsMove - Move file from one filesystem to another.
  364. * @param srcFS The handle to source filesystem.
  365. * @param src The path of source file.
  366. * @param dstFS The handle to destination filesystem.
  367. * @param dst The path of destination file.
  368. * @return Returns 0 on success, -1 on error.
  369. */
  370. int hdfsMove(hdfsFS srcFS, const char* src, hdfsFS dstFS, const char* dst);
  371. /**
  372. * hdfsDelete - Delete file.
  373. * @param fs The configured filesystem handle.
  374. * @param path The path of the file.
  375. * @param recursive if path is a directory and set to
  376. * non-zero, the directory is deleted else throws an exception. In
  377. * case of a file the recursive argument is irrelevant.
  378. * @return Returns 0 on success, -1 on error.
  379. */
  380. int hdfsDelete(hdfsFS fs, const char* path, int recursive);
  381. /**
  382. * hdfsRename - Rename file.
  383. * @param fs The configured filesystem handle.
  384. * @param oldPath The path of the source file.
  385. * @param newPath The path of the destination file.
  386. * @return Returns 0 on success, -1 on error.
  387. */
  388. int hdfsRename(hdfsFS fs, const char* oldPath, const char* newPath);
  389. /**
  390. * hdfsGetWorkingDirectory - Get the current working directory for
  391. * the given filesystem.
  392. * @param fs The configured filesystem handle.
  393. * @param buffer The user-buffer to copy path of cwd into.
  394. * @param bufferSize The length of user-buffer.
  395. * @return Returns buffer, NULL on error.
  396. */
  397. char* hdfsGetWorkingDirectory(hdfsFS fs, char *buffer, size_t bufferSize);
  398. /**
  399. * hdfsSetWorkingDirectory - Set the working directory. All relative
  400. * paths will be resolved relative to it.
  401. * @param fs The configured filesystem handle.
  402. * @param path The path of the new 'cwd'.
  403. * @return Returns 0 on success, -1 on error.
  404. */
  405. int hdfsSetWorkingDirectory(hdfsFS fs, const char* path);
  406. /**
  407. * hdfsCreateDirectory - Make the given file and all non-existent
  408. * parents into directories.
  409. * @param fs The configured filesystem handle.
  410. * @param path The path of the directory.
  411. * @return Returns 0 on success, -1 on error.
  412. */
  413. int hdfsCreateDirectory(hdfsFS fs, const char* path);
  414. /**
  415. * hdfsSetReplication - Set the replication of the specified
  416. * file to the supplied value
  417. * @param fs The configured filesystem handle.
  418. * @param path The path of the file.
  419. * @return Returns 0 on success, -1 on error.
  420. */
  421. int hdfsSetReplication(hdfsFS fs, const char* path, int16_t replication);
  422. /**
  423. * hdfsFileInfo - Information about a file/directory.
  424. */
  425. typedef struct {
  426. tObjectKind mKind; /* file or directory */
  427. char *mName; /* the name of the file */
  428. tTime mLastMod; /* the last modification time for the file in seconds */
  429. tOffset mSize; /* the size of the file in bytes */
  430. short mReplication; /* the count of replicas */
  431. tOffset mBlockSize; /* the block size for the file */
  432. char *mOwner; /* the owner of the file */
  433. char *mGroup; /* the group associated with the file */
  434. short mPermissions; /* the permissions associated with the file */
  435. tTime mLastAccess; /* the last access time for the file in seconds */
  436. } hdfsFileInfo;
  437. /**
  438. * hdfsListDirectory - Get list of files/directories for a given
  439. * directory-path. hdfsFreeFileInfo should be called to deallocate memory.
  440. * @param fs The configured filesystem handle.
  441. * @param path The path of the directory.
  442. * @param numEntries Set to the number of files/directories in path.
  443. * @return Returns a dynamically-allocated array of hdfsFileInfo
  444. * objects; NULL on error.
  445. */
  446. hdfsFileInfo *hdfsListDirectory(hdfsFS fs, const char* path,
  447. int *numEntries);
  448. /**
  449. * hdfsGetPathInfo - Get information about a path as a (dynamically
  450. * allocated) single hdfsFileInfo struct. hdfsFreeFileInfo should be
  451. * called when the pointer is no longer needed.
  452. * @param fs The configured filesystem handle.
  453. * @param path The path of the file.
  454. * @return Returns a dynamically-allocated hdfsFileInfo object;
  455. * NULL on error.
  456. */
  457. hdfsFileInfo *hdfsGetPathInfo(hdfsFS fs, const char* path);
  458. /**
  459. * hdfsFreeFileInfo - Free up the hdfsFileInfo array (including fields)
  460. * @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo
  461. * objects.
  462. * @param numEntries The size of the array.
  463. */
  464. void hdfsFreeFileInfo(hdfsFileInfo *hdfsFileInfo, int numEntries);
  465. /**
  466. * hdfsGetHosts - Get hostnames where a particular block (determined by
  467. * pos & blocksize) of a file is stored. The last element in the array
  468. * is NULL. Due to replication, a single block could be present on
  469. * multiple hosts.
  470. * @param fs The configured filesystem handle.
  471. * @param path The path of the file.
  472. * @param start The start of the block.
  473. * @param length The length of the block.
  474. * @return Returns a dynamically-allocated 2-d array of blocks-hosts;
  475. * NULL on error.
  476. */
  477. char*** hdfsGetHosts(hdfsFS fs, const char* path,
  478. tOffset start, tOffset length);
  479. /**
  480. * hdfsFreeHosts - Free up the structure returned by hdfsGetHosts
  481. * @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo
  482. * objects.
  483. * @param numEntries The size of the array.
  484. */
  485. void hdfsFreeHosts(char ***blockHosts);
  486. /**
  487. * hdfsGetDefaultBlockSize - Get the default blocksize.
  488. *
  489. * @param fs The configured filesystem handle.
  490. * @deprecated Use hdfsGetDefaultBlockSizeAtPath instead.
  491. *
  492. * @return Returns the default blocksize, or -1 on error.
  493. */
  494. tOffset hdfsGetDefaultBlockSize(hdfsFS fs);
  495. /**
  496. * hdfsGetDefaultBlockSizeAtPath - Get the default blocksize at the
  497. * filesystem indicated by a given path.
  498. *
  499. * @param fs The configured filesystem handle.
  500. * @param path The given path will be used to locate the actual
  501. * filesystem. The full path does not have to exist.
  502. *
  503. * @return Returns the default blocksize, or -1 on error.
  504. */
  505. tOffset hdfsGetDefaultBlockSizeAtPath(hdfsFS fs, const char *path);
  506. /**
  507. * hdfsGetCapacity - Return the raw capacity of the filesystem.
  508. * @param fs The configured filesystem handle.
  509. * @return Returns the raw-capacity; -1 on error.
  510. */
  511. tOffset hdfsGetCapacity(hdfsFS fs);
  512. /**
  513. * hdfsGetUsed - Return the total raw size of all files in the filesystem.
  514. * @param fs The configured filesystem handle.
  515. * @return Returns the total-size; -1 on error.
  516. */
  517. tOffset hdfsGetUsed(hdfsFS fs);
  518. /**
  519. * Change the user and/or group of a file or directory.
  520. *
  521. * @param fs The configured filesystem handle.
  522. * @param path the path to the file or directory
  523. * @param owner User string. Set to NULL for 'no change'
  524. * @param group Group string. Set to NULL for 'no change'
  525. * @return 0 on success else -1
  526. */
  527. int hdfsChown(hdfsFS fs, const char* path, const char *owner,
  528. const char *group);
  529. /**
  530. * hdfsChmod
  531. * @param fs The configured filesystem handle.
  532. * @param path the path to the file or directory
  533. * @param mode the bitmask to set it to
  534. * @return 0 on success else -1
  535. */
  536. int hdfsChmod(hdfsFS fs, const char* path, short mode);
  537. /**
  538. * hdfsUtime
  539. * @param fs The configured filesystem handle.
  540. * @param path the path to the file or directory
  541. * @param mtime new modification time or -1 for no change
  542. * @param atime new access time or -1 for no change
  543. * @return 0 on success else -1
  544. */
  545. int hdfsUtime(hdfsFS fs, const char* path, tTime mtime, tTime atime);
  546. #ifdef __cplusplus
  547. }
  548. #endif
  549. #endif /*LIBHDFS_HDFS_H*/
  550. /**
  551. * vim: ts=4: sw=4: et
  552. */