1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 * Read-Only HDFS Virtual File Driver (VFD) * 3 * Copyright (c) 2018, The HDF Group. * 4 * * 5 * All rights reserved. * 6 * * 7 * NOTICE: * 8 * All information contained herein is, and remains, the property of The HDF * 9 * Group. The intellectual and technical concepts contained herein are * 10 * proprietary to The HDF Group. Dissemination of this information or * 11 * reproduction of this material is strictly forbidden unless prior written * 12 * permission is obtained from The HDF Group. * 13 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 14 15 /* 16 * Programmer: Jacob Smith 17 * 2018-04-23 18 * 19 * Purpose: The public header file for the hdfs driver. 20 */ 21 22 #ifndef H5FDhdfs_H 23 #define H5FDhdfs_H 24 25 #define H5FD_HDFS (H5FD_hdfs_init()) 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 /**************************************************************************** 32 * 33 * Structure: H5FD_hdfs_fapl_t 34 * 35 * Purpose: 36 * 37 * H5FD_hdfs_fapl_t is a public structure that is used to pass 38 * configuration information to the appropriate HDFS VFD via the FAPL. 39 * A pointer to an instance of this structure is a parameter to 40 * H5Pset_fapl_hdfs() and H5Pget_fapl_hdfs(). 41 * 42 * 43 * 44 * `version` (int32_t) 45 * 46 * Version number of the `H5FD_hdfs_fapl_t` structure. Any instance passed 47 * to the above calls must have a recognized version number, or an error 48 * will be flagged. 49 * 50 * This field should be set to `H5FD__CURR_HDFS_FAPL_T_VERSION`. 51 * 52 * `namenode_name` (const char[]) 53 * 54 * Name of "Name Node" to access as the HDFS server. 55 * 56 * Must not be longer than `H5FD__HDFS_NODE_NAME_SPACE`. 57 * 58 * TBD: Can be NULL. 59 * 60 * `namenode_port` (int32_t) TBD 61 * 62 * Port number to use to connect with Name Node. 63 * 64 * TBD: If 0, uses a default port. 65 * 66 * `kerberos_ticket_cache` (const char[]) 67 * 68 * Path to the location of the Kerberos authentication cache. 69 * 70 * Must not be longer than `H5FD__HDFS_KERB_CACHE_PATH_SPACE`. 71 * 72 * TBD: Can be NULL. 73 * 74 * `user_name` (const char[]) 75 * 76 * Username to use when accessing file. 77 * 78 * Must not be longer than `H5FD__HDFS_USER_NAME_SPACE`. 79 * 80 * TBD: Can be NULL. 81 * 82 * `stream_buffer_size` (int32_t) 83 * 84 * Size (in bytes) of the file read stream buffer. 85 * 86 * TBD: If -1, relies on a default value. 87 * 88 * 89 * 90 * Programmer: Jacob Smith 91 * 2018-04-23 92 * 93 * Changes: None 94 * 95 ****************************************************************************/ 96 97 #define H5FD__CURR_HDFS_FAPL_T_VERSION 1 98 99 #define H5FD__HDFS_NODE_NAME_SPACE 128 100 #define H5FD__HDFS_USER_NAME_SPACE 128 101 #define H5FD__HDFS_KERB_CACHE_PATH_SPACE 128 102 103 typedef struct H5FD_hdfs_fapl_t { 104 int32_t version; 105 char namenode_name[H5FD__HDFS_NODE_NAME_SPACE + 1]; 106 int32_t namenode_port; 107 char user_name[H5FD__HDFS_USER_NAME_SPACE + 1]; 108 char kerberos_ticket_cache[H5FD__HDFS_KERB_CACHE_PATH_SPACE + 1]; 109 int32_t stream_buffer_size; 110 } H5FD_hdfs_fapl_t; 111 112 H5_DLL hid_t H5FD_hdfs_init(void); 113 H5_DLL herr_t H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out); 114 H5_DLL herr_t H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa); 115 116 #ifdef __cplusplus 117 } 118 #endif 119 120 #endif /* ifndef H5FDhdfs_H */ 121 122 123