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