Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorFromHttpResponse(resp *http.Response) error
- func IsAccessControlException(err error) bool
- func IsFileNotFoundException(err error) bool
- func IsIllegalArgumentException(err error) bool
- func IsSecurityException(err error) bool
- func XAttrNamespaceSliceContains(enums []XAttrNamespace, sunEnums ...XAttrNamespace) bool
- func XAttrNamespaceSliceContainsAny(enums []XAttrNamespace, sunEnums ...XAttrNamespace) bool
- type AllowSnapshotRequest
- type AllowSnapshotResponse
- type AppendRequest
- type AppendResponse
- type Authentication
- type BlockLocation
- type BlockLocationProperties
- type BlockLocations
- type BlockStoragePolicies
- type BlockStoragePolicy
- type BlockStoragePolicyProperties
- type Boolean
- type CSRF
- type CancelDelegationTokenRequest
- type CancelDelegationTokenResponse
- type CheckAccessRequest
- type CheckAccessResponse
- type Client
- func (c *Client) AllowSnapshot(req *AllowSnapshotRequest) (*AllowSnapshotResponse, error)
- func (c *Client) AllowSnapshotWithContext(ctx context.Context, req *AllowSnapshotRequest) (*AllowSnapshotResponse, error)
- func (c *Client) Append(req *AppendRequest) (*AppendResponse, error)
- func (c *Client) AppendWithContext(ctx context.Context, req *AppendRequest) (*AppendResponse, error)
- func (o *Client) ApplyOptions(options ...ClientOption) *Client
- func (c *Client) CancelDelegationToken(req *CancelDelegationTokenRequest) (*CancelDelegationTokenResponse, error)
- func (c *Client) CancelDelegationTokenWithContext(ctx context.Context, req *CancelDelegationTokenRequest) (*CancelDelegationTokenResponse, error)
- func (c *Client) CheckAccess(req *CheckAccessRequest) (*CheckAccessResponse, error)
- func (c *Client) CheckAccessWithContext(ctx context.Context, req *CheckAccessRequest) (*CheckAccessResponse, error)
- func (c *Client) Concat(req *ConcatRequest) (*ConcatResponse, error)
- func (c *Client) ConcatWithContext(ctx context.Context, req *ConcatRequest) (*ConcatResponse, error)
- func (c *Client) Create(req *CreateRequest) (*CreateResponse, error)
- func (c *Client) CreateSnapshot(req *CreateSnapshotRequest) (*CreateSnapshotResponse, error)
- func (c *Client) CreateSnapshotWithContext(ctx context.Context, req *CreateSnapshotRequest) (*CreateSnapshotResponse, error)
- func (c *Client) CreateSymlink(req *CreateSymlinkRequest) (*CreateSymlinkResponse, error)
- func (c *Client) CreateSymlinkWithContext(ctx context.Context, req *CreateSymlinkRequest) (*CreateSymlinkResponse, error)
- func (c *Client) CreateWithContext(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
- func (c *Client) Delete(req *DeleteRequest) (*DeleteResponse, error)
- func (c *Client) DeleteSnapshot(req *DeleteSnapshotRequest) (*DeleteSnapshotResponse, error)
- func (c *Client) DeleteSnapshotWithContext(ctx context.Context, req *DeleteSnapshotRequest) (*DeleteSnapshotResponse, error)
- func (c *Client) DeleteWithContext(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
- func (c *Client) DisableECPolicy(req *DisableECPolicyRequest) (*DisableECPolicyResponse, error)
- func (c *Client) DisableECPolicyWithContext(ctx context.Context, req *DisableECPolicyRequest) (*DisableECPolicyResponse, error)
- func (c *Client) DisallowSnapshot(req *DisallowSnapshotRequest) (*DisallowSnapshotResponse, error)
- func (c *Client) DisallowSnapshotWithContext(ctx context.Context, req *DisallowSnapshotRequest) (*DisallowSnapshotResponse, error)
- func (c *Client) EnableECPolicy(req *EnableECPolicyRequest) (*EnableECPolicyResponse, error)
- func (c *Client) EnableECPolicyWithContext(ctx context.Context, req *EnableECPolicyRequest) (*EnableECPolicyResponse, error)
- func (c *Client) GetAllStoragePolicy(req *GetAllStoragePolicyRequest) (*GetAllStoragePolicyResponse, error)
- func (c *Client) GetAllStoragePolicyWithContext(ctx context.Context, req *GetAllStoragePolicyRequest) (*GetAllStoragePolicyResponse, error)
- func (c *Client) GetAllXAttrs(req *GetAllXAttrsRequest) (*GetAllXAttrsResponse, error)
- func (c *Client) GetAllXAttrsWithContext(ctx context.Context, req *GetAllXAttrsRequest) (*GetAllXAttrsResponse, error)
- func (c *Client) GetContentSummary(req *GetContentSummaryRequest) (*GetContentSummaryResponse, error)
- func (c *Client) GetContentSummaryWithContext(ctx context.Context, req *GetContentSummaryRequest) (*GetContentSummaryResponse, error)
- func (c *Client) GetDelegationToken(req *GetDelegationTokenRequest) (*GetDelegationTokenResponse, error)
- func (c *Client) GetDelegationTokenWithContext(ctx context.Context, req *GetDelegationTokenRequest) (*GetDelegationTokenResponse, error)
- func (c *Client) GetECPolicy(req *GetECPolicyRequest) (*GetECPolicyResponse, error)
- func (c *Client) GetECPolicyWithContext(ctx context.Context, req *GetECPolicyRequest) (*GetECPolicyResponse, error)
- func (c *Client) GetFileBlockLocations(req *GetFileBlockLocationsRequest) (*GetFileBlockLocationsResponse, error)
- func (c *Client) GetFileBlockLocationsWithContext(ctx context.Context, req *GetFileBlockLocationsRequest) (*GetFileBlockLocationsResponse, error)
- func (c *Client) GetFileChecksum(req *GetFileChecksumRequest) (*GetFileChecksumResponse, error)
- func (c *Client) GetFileChecksumWithContext(ctx context.Context, req *GetFileChecksumRequest) (*GetFileChecksumResponse, error)
- func (c *Client) GetFileStatus(req *GetFileStatusRequest) (*GetFileStatusResponse, error)
- func (c *Client) GetFileStatusWithContext(ctx context.Context, req *GetFileStatusRequest) (*GetFileStatusResponse, error)
- func (c *Client) GetHomeDirectory(req *GetHomeDirectoryRequest) (*GetHomeDirectoryResponse, error)
- func (c *Client) GetHomeDirectoryWithContext(ctx context.Context, req *GetHomeDirectoryRequest) (*GetHomeDirectoryResponse, error)
- func (c *Client) GetQuotaUsage(req *GetQuotaUsageRequest) (*GetQuotaUsageResponse, error)
- func (c *Client) GetQuotaUsageWithContext(ctx context.Context, req *GetQuotaUsageRequest) (*GetQuotaUsageResponse, error)
- func (c *Client) GetSnapshotDiff(req *GetSnapshotDiffRequest) (*GetSnapshotDiffResponse, error)
- func (c *Client) GetSnapshotDiffWithContext(ctx context.Context, req *GetSnapshotDiffRequest) (*GetSnapshotDiffResponse, error)
- func (c *Client) GetSnapshottableDirectoryList(req *GetSnapshottableDirectoryListRequest) (*GetSnapshottableDirectoryListResponse, error)
- func (c *Client) GetSnapshottableDirectoryListWithContext(ctx context.Context, req *GetSnapshottableDirectoryListRequest) (*GetSnapshottableDirectoryListResponse, error)
- func (c *Client) GetStoragePolicy(req *GetStoragePolicyRequest) (*GetStoragePolicyResponse, error)
- func (c *Client) GetStoragePolicyWithContext(ctx context.Context, req *GetStoragePolicyRequest) (*GetStoragePolicyResponse, error)
- func (c *Client) GetTrashRoot(req *GetTrashRootRequest) (*GetTrashRootResponse, error)
- func (c *Client) GetTrashRootWithContext(ctx context.Context, req *GetTrashRootRequest) (*GetTrashRootResponse, error)
- func (c *Client) GetXAttr(req *GetXAttrRequest) (*GetXAttrResponse, error)
- func (c *Client) GetXAttrWithContext(ctx context.Context, req *GetXAttrRequest) (*GetXAttrResponse, error)
- func (c *Client) GetXAttrs(req *GetXAttrsRequest) (*GetXAttrsResponse, error)
- func (c *Client) GetXAttrsWithContext(ctx context.Context, req *GetXAttrsRequest) (*GetXAttrsResponse, error)
- func (c *Client) HttpSchema() string
- func (c *Client) HttpUrl(query Request) url.URL
- func (c *Client) ListStatus(req *ListStatusRequest) (*ListStatusResponse, error)
- func (c *Client) ListStatusBatch(req *ListStatusBatchRequest) (*ListStatusBatchResponse, error)
- func (c *Client) ListStatusBatchWithContext(ctx context.Context, req *ListStatusBatchRequest) (*ListStatusBatchResponse, error)
- func (c *Client) ListStatusWithContext(ctx context.Context, req *ListStatusRequest) (*ListStatusResponse, error)
- func (c *Client) ListXAttrs(req *ListXAttrsRequest) (*ListXAttrsResponse, error)
- func (c *Client) ListXAttrsWithContext(ctx context.Context, req *ListXAttrsRequest) (*ListXAttrsResponse, error)
- func (c *Client) Mkdirs(req *MkdirsRequest) (*MkdirsResponse, error)
- func (c *Client) MkdirsWithContext(ctx context.Context, req *MkdirsRequest) (*MkdirsResponse, error)
- func (c *Client) Open(req *OpenRequest) (*OpenResponse, error)
- func (c *Client) OpenWithContext(ctx context.Context, req *OpenRequest) (*OpenResponse, error)
- func (c *Client) ProxyUser() ProxyUser
- func (c *Client) RemoveXAttr(req *RemoveXAttrRequest) (*RemoveXAttrResponse, error)
- func (c *Client) RemoveXAttrWithContext(ctx context.Context, req *RemoveXAttrRequest) (*RemoveXAttrResponse, error)
- func (c *Client) Rename(req *RenameRequest) (*RenameResponse, error)
- func (c *Client) RenameSnapshot(req *RenameSnapshotRequest) (*RenameSnapshotResponse, error)
- func (c *Client) RenameSnapshotWithContext(ctx context.Context, req *RenameSnapshotRequest) (*RenameSnapshotResponse, error)
- func (c *Client) RenameWithContext(ctx context.Context, req *RenameRequest) (*RenameResponse, error)
- func (c *Client) RenewDelegationToken(req *RenewDelegationTokenRequest) (*RenewDelegationTokenResponse, error)
- func (c *Client) RenewDelegationTokenWithContext(ctx context.Context, req *RenewDelegationTokenRequest) (*RenewDelegationTokenResponse, error)
- func (c *Client) SatisfyStoragePolicy(req *SatisfyStoragePolicyRequest) (*SatisfyStoragePolicyResponse, error)
- func (c *Client) SatisfyStoragePolicyWithContext(ctx context.Context, req *SatisfyStoragePolicyRequest) (*SatisfyStoragePolicyResponse, error)
- func (c *Client) SetECPolicy(req *SetECPolicyRequest) (*SetECPolicyResponse, error)
- func (c *Client) SetECPolicyWithContext(ctx context.Context, req *SetECPolicyRequest) (*SetECPolicyResponse, error)
- func (c *Client) SetOwner(req *SetOwnerRequest) (*SetOwnerResponse, error)
- func (c *Client) SetOwnerWithContext(ctx context.Context, req *SetOwnerRequest) (*SetOwnerResponse, error)
- func (c *Client) SetPermission(req *SetPermissionRequest) (*SetPermissionResponse, error)
- func (c *Client) SetPermissionWithContext(ctx context.Context, req *SetPermissionRequest) (*SetPermissionResponse, error)
- func (c *Client) SetReplication(req *SetReplicationRequest) (*SetReplicationResponse, error)
- func (c *Client) SetReplicationWithContext(ctx context.Context, req *SetReplicationRequest) (*SetReplicationResponse, error)
- func (c *Client) SetStoragePolicy(req *SetStoragePolicyRequest) (*SetStoragePolicyResponse, error)
- func (c *Client) SetStoragePolicyWithContext(ctx context.Context, req *SetStoragePolicyRequest) (*SetStoragePolicyResponse, error)
- func (c *Client) SetTimes(req *SetTimesRequest) (*SetTimesResponse, error)
- func (c *Client) SetTimesWithContext(ctx context.Context, req *SetTimesRequest) (*SetTimesResponse, error)
- func (c *Client) SetXAttr(req *SetXAttrRequest) (*SetXAttrResponse, error)
- func (c *Client) SetXAttrWithContext(ctx context.Context, req *SetXAttrRequest) (*SetXAttrResponse, error)
- func (c *Client) Truncate(req *TruncateRequest) (*TruncateResponse, error)
- func (c *Client) TruncateWithContext(ctx context.Context, req *TruncateRequest) (*TruncateResponse, error)
- func (c *Client) UnsetECPolicy(req *UnsetECPolicyRequest) (*UnsetECPolicyResponse, error)
- func (c *Client) UnsetECPolicyWithContext(ctx context.Context, req *UnsetECPolicyRequest) (*UnsetECPolicyResponse, error)
- func (c *Client) UnsetStoragePolicy(req *UnsetStoragePolicyRequest) (*UnsetStoragePolicyResponse, error)
- func (c *Client) UnsetStoragePolicyWithContext(ctx context.Context, req *UnsetStoragePolicyRequest) (*UnsetStoragePolicyResponse, error)
- func (c *Client) UrlString(addr string, req Request) (string, error)
- type ClientOption
- func WithDisableSSL(disableSSL bool) ClientOption
- func WithHttpClient(httpCli *http.Client) ClientOption
- func WithKerberosCCache(username string, spn string, realm string, cc string, krb5Con string) ClientOption
- func WithKerberosCCacheFile(username string, spn string, realm string, ccFile string, krb5ConFile string) ClientOption
- func WithKerberosConfig(kerberosConfig *kerberos.Config) ClientOption
- func WithKerberosKeytab(username string, spn string, realm string, keytab string, krb5Con string) ClientOption
- func WithKerberosKeytabFile(username string, spn string, realm string, keytabFile string, ...) ClientOption
- func WithKerberosPassword(username string, spn string, realm string, password string, krb5Con string) ClientOption
- func WithValidator(v *validator.Validate) ClientOption
- type ClientOptionFunc
- type CompletedConfig
- type ConcatRequest
- type ConcatResponse
- type Config
- type ContentSummary
- type CreateRequest
- type CreateResponse
- type CreateSnapshotRequest
- type CreateSnapshotResponse
- type CreateSymlinkRequest
- type CreateSymlinkResponse
- type DeleteRequest
- type DeleteResponse
- type DeleteSnapshotRequest
- type DeleteSnapshotResponse
- type DiffReportEntry
- type DiffReportEntryType
- type DirectoryListing
- type DisableECPolicyRequest
- type DisableECPolicyResponse
- type DisallowSnapshotRequest
- type DisallowSnapshotResponse
- type ECPolicy
- type ECPolicySchema
- type EmptyClientOption
- type EnableECPolicyRequest
- type EnableECPolicyResponse
- type ErrorResponse
- type FileChecksum
- type FileStatus
- type FileStatusProperties
- type FileStatuses
- type FileType
- type GetAllStoragePolicyRequest
- type GetAllStoragePolicyResponse
- type GetAllXAttrsRequest
- type GetAllXAttrsResponse
- type GetContentSummaryRequest
- type GetContentSummaryResponse
- type GetDelegationTokenRequest
- type GetDelegationTokenResponse
- type GetECPolicyRequest
- type GetECPolicyResponse
- type GetFileBlockLocationsRequest
- type GetFileBlockLocationsResponse
- type GetFileChecksumRequest
- type GetFileChecksumResponse
- type GetFileStatusRequest
- type GetFileStatusResponse
- type GetHomeDirectoryRequest
- type GetHomeDirectoryResponse
- type GetQuotaUsageRequest
- type GetQuotaUsageResponse
- type GetSnapshotDiffRequest
- type GetSnapshotDiffResponse
- type GetSnapshottableDirectoryListRequest
- type GetSnapshottableDirectoryListResponse
- type GetStoragePolicyRequest
- type GetStoragePolicyResponse
- type GetTrashRootRequest
- type GetTrashRootResponse
- type GetXAttrRequest
- type GetXAttrResponse
- type GetXAttrsRequest
- type GetXAttrsResponse
- type HttpClient
- type HttpRequest
- type HttpResponse
- type ListStatusBatchRequest
- type ListStatusBatchResponse
- type ListStatusRequest
- type ListStatusResponse
- type ListXAttrsRequest
- type ListXAttrsResponse
- type Long
- type MkdirsRequest
- type MkdirsResponse
- type OpenRequest
- type OpenResponse
- type Path
- type Permission
- type ProxyUser
- type Quota
- type QuotaUsage
- type RemoteException
- type RemoveXAttrRequest
- type RemoveXAttrResponse
- type RenameRequest
- type RenameResponse
- type RenameSnapshotRequest
- type RenameSnapshotResponse
- type RenewDelegationTokenRequest
- type RenewDelegationTokenResponse
- type Request
- type SatisfyStoragePolicyRequest
- type SatisfyStoragePolicyResponse
- type SetECPolicyRequest
- type SetECPolicyResponse
- type SetOwnerRequest
- type SetOwnerResponse
- type SetPermissionRequest
- type SetPermissionResponse
- type SetReplicationRequest
- type SetReplicationResponse
- type SetStoragePolicyRequest
- type SetStoragePolicyResponse
- type SetTimesRequest
- type SetTimesResponse
- type SetXAttrRequest
- type SetXAttrResponse
- type SnapshotDiffReport
- type SnapshottableDirectoryList
- type SnapshottableDirectoryStatus
- type StorageType
- type Token
- type TruncateRequest
- type TruncateResponse
- type TypeQuota
- type UnsetECPolicyRequest
- type UnsetECPolicyResponse
- type UnsetStoragePolicyRequest
- type UnsetStoragePolicyResponse
- type XAttr
- type XAttrNames
- type XAttrNamespace
- func (i XAttrNamespace) MarshalBinary() (data []byte, err error)
- func (i XAttrNamespace) MarshalJSON() ([]byte, error)
- func (i XAttrNamespace) MarshalText() ([]byte, error)
- func (i XAttrNamespace) MarshalYAML() (interface{}, error)
- func (i XAttrNamespace) New() *XAttrNamespace
- func (i XAttrNamespace) Registered() bool
- func (i *XAttrNamespace) Scan(value interface{}) error
- func (i XAttrNamespace) String() string
- func (i *XAttrNamespace) UnmarshalBinary(data []byte) error
- func (i *XAttrNamespace) UnmarshalJSON(data []byte) error
- func (i *XAttrNamespace) UnmarshalText(text []byte) error
- func (i *XAttrNamespace) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i XAttrNamespace) Value() (driver.Value, error)
- type XAttrSetFlag
- type XAttrValueEncoding
- type XAttrs
Constants ¶
const ( OpOpen = "OPEN" OpGetFileStatus = "GETFILESTATUS" OpListStatus = "LISTSTATUS" OpListStatusBatch = "LISTSTATUS_BATCH" OpGetContentSummary = "GETCONTENTSUMMARY" OpGetQuotaUsage = "GETQUOTAUSAGE" OpGetFileChecksum = "GETFILECHECKSUM" OpGetHomeDirectory = "GETHOMEDIRECTORY" OpGetDelegationToken = "GETDELEGATIONTOKEN" OpGetTrashRoot = "GETTRASHROOT" OpGetXAttr = "GETXATTRS" OpGetXAttrs = "GETXATTRS" OpGetAllXAttrs = "GETXATTRS" OpListXAttrs = "LISTXATTRS" OpCheckAccess = "CHECKACCESS" OpGetAllStoragePolicy = "GETALLSTORAGEPOLICY" OpGetStoragePolicy = "GETSTORAGEPOLICY" OpGetSnapshotDiff = "GETSNAPSHOTDIFF" OpGetSnapshottableDirectoryList = "GETSNAPSHOTTABLEDIRECTORYLIST" OpGetFileBlockLocations = "GETFILEBLOCKLOCATIONS" OpGetECPolicy = "GETECPOLICY" OpCreate = "CREATE" OpMkdirs = "MKDIRS" OpCreateSymlink = "CREATESYMLINK" OpRename = "RENAME" OpSetReplication = "SETREPLICATION" OpSetOwner = "SETOWNER" OpSetPermission = "SETPERMISSION" OpSetTimes = "SETTIMES" OpRenewDelegationToken = "RENEWDELEGATIONTOKEN" OpCancelDelegationToken = "CANCELDELEGATIONTOKEN" OpAllowSnapshot = "ALLOWSNAPSHOT" OpDisallowSnapshot = "DISALLOWSNAPSHOT" OpCreateSnapshot = "CREATESNAPSHOT" OpRenameSnapshot = "RENAMESNAPSHOT" OpSetXAttr = "SETXATTR" OpRemoveXAttr = "REMOVEXATTR" OpSetStoragePolicy = "SETSTORAGEPOLICY" OpSatisfyStoragePolicy = "SATISFYSTORAGEPOLICY" OpEnableECPolicy = "ENABLEECPOLICY" OpDisableECPolicy = "DISABLEECPOLICY" OpSetECPolicy = "SETECPOLICY" OpAppend = "APPEND" OpConcat = "CONCAT" OpTruncate = "TRUNCATE" OpUnsetStoragePolicy = "UNSETSTORAGEPOLICY" OpUnsetECPolicy = "UNSETECPOLICY" OpDelete = "DELETE" OpDeleteSnapshot = "DELETESNAPSHOT" )
const ( HttpQueryParamKeyXAttrName = "xattr.name" HttpQueryParamKeyXAttrValueEncoding = "encoding" )
HTTP Query Parameter Dictionary
const ( JavaClassNameFileNotFoundException = "java.io.FileNotFoundException" JavaClassNameAccessControlException = "org.apache.hadoop.security.AccessControlException" JavaClassNamePathIsNotEmptyDirectoryException = "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" JavaClassNameFileAlreadyExistsException = "org.apache.hadoop.fs.FileAlreadyExistsException" JavaClassNameAlreadyBeingCreatedException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException" )
const (
PathPrefix = "/webhdfs/v1/"
)
Variables ¶
var (
MaxHTTPBodyLengthDumped = 100
)
Functions ¶
func ErrorFromHttpResponse ¶ added in v0.0.8
func IsFileNotFoundException ¶
func IsSecurityException ¶
func XAttrNamespaceSliceContains ¶
func XAttrNamespaceSliceContains(enums []XAttrNamespace, sunEnums ...XAttrNamespace) bool
XAttrNamespaceSliceContains reports whether sunEnums is within enums.
func XAttrNamespaceSliceContainsAny ¶
func XAttrNamespaceSliceContainsAny(enums []XAttrNamespace, sunEnums ...XAttrNamespace) bool
XAttrNamespaceSliceContainsAny reports whether any sunEnum is within enums.
Types ¶
type AllowSnapshotRequest ¶
type AllowSnapshotRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*AllowSnapshotRequest) RawPath ¶
func (req *AllowSnapshotRequest) RawPath() string
func (*AllowSnapshotRequest) RawQuery ¶
func (req *AllowSnapshotRequest) RawQuery() string
type AllowSnapshotResponse ¶
type AllowSnapshotResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*AllowSnapshotResponse) UnmarshalHTTP ¶
func (resp *AllowSnapshotResponse) UnmarshalHTTP(httpResp *http.Response) error
type AppendRequest ¶
type AppendRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Object data. Body io.Reader // ContentLength records the length of the associated content. // The value -1 indicates that the length is unknown. // Values >= 0 indicate that the given number of bytes may // be read from Body. // // For client requests, a value of 0 with a non-nil Body is // also treated as unknown. // For HttpFs, ContentType and ContentLength is needed with a non-nil Body // ContentLength will be computed inner when Body is one of type [*bytes.Buffer, *bytes.Reader, *strings.Reader] // See https://issues.cloudera.org/browse/HUE-679 // Missing or unknown request method // Missing URL // Missing HTTP Identifier (HTTP/1.0) // Request is too large // Content-Length missing for POST or PUT requests // Illegal character in hostname; underscores are not allowed ContentLength *int64 // Name buffersize // Description The size of the buffer used in transferring data. // Type int // Default Value Specified in the configuration. // Valid Values > 0 // Syntax Any integer. BufferSize *int // Name nodirect // Description Disable automatically redirected. // Type bool // Default Value false // Valid Values true|false // Syntax Any Bool. NoDirect *bool }
func (*AppendRequest) RawPath ¶
func (req *AppendRequest) RawPath() string
func (*AppendRequest) RawQuery ¶
func (req *AppendRequest) RawQuery() string
type AppendResponse ¶
type AppendResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` NoDirect bool `json:"-"` Location *string `json:"Location"` }
func (*AppendResponse) UnmarshalHTTP ¶
func (resp *AppendResponse) UnmarshalHTTP(httpResp *http.Response) error
type Authentication ¶
type Authentication struct { // Delegation // Name delegation // Description The delegation token used for authentication. // Type String // Default Value <empty> // Valid Values An encoded token. // Syntax See the note below. // Note that delegation tokens are encoded as a URL safe string; // see encodeToUrlString() and decodeFromUrlString(String) in org.apache.hadoop.security.token.Token for the details of the encoding. Delegation *string }
See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Authentication When security is off, the authenticated user is the username specified in the user.name query parameter. If the user.name parameter is not set, the server may either set the authenticated user to a default web user, if there is any, or return an error response. When security is on, authentication is performed by either Hadoop delegation token or Kerberos SPNEGO. If a token is set in the delegation query parameter, the authenticated user is the user encoded in the token. If the delegation parameter is not set, the user is authenticated by Kerberos SPNEGO. Below are examples using the curl command tool. Authentication when security is off:
curl -i "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?[user.name=<USER>&]op=..."
Authentication using Kerberos SPNEGO when security is on:
curl -i --negotiate -u : "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=..."
Authentication using Hadoop delegation token when security is on:
curl -i "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?delegation=<TOKEN>&op=..."
See also: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/HttpAuthentication.html
type BlockLocation ¶
type BlockLocation = BlockLocationProperties
type BlockLocationProperties ¶
type BlockLocationProperties struct { CachedHosts []string `json:"cachedHosts" validate:"required"` // Datanode hostnames with a cached replica Corrupt bool `json:"corrupt" validate:"required"` // True if the block is corrupted Hosts []string `json:"hosts" validate:"required"` // Datanode hostnames store the block Length int64 `json:"length" validate:"required"` // Length of the block Names []string `json:"names" validate:"required"` // Datanode IP:xferPort for accessing the block Offset int64 `json:"offset" validate:"required"` // Offset of the block in the file StorageTypes []StorageType `json:"storageTypes" validate:"required"` // Storage type of each replica, ["RAM_DISK", "SSD", "DISK", "ARCHIVE"] TopologyPaths []string `json:"topologyPaths" validate:"required"` // Datanode addresses in network topology, [ /rack/host:ip ] }
JavaScript syntax is used to define blockLocationProperties so that it can be referred in both BlockLocation and BlockLocations JSON schemas. See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#BlockLocation_Properties
type BlockLocations ¶
type BlockLocations = struct {
BlockLocations []BlockLocation `json:"BlockLocation"` // An array of BlockLocation
}
type BlockStoragePolicies ¶
type BlockStoragePolicies struct {
BlockStoragePolicies []BlockStoragePolicyProperties `json:"BlockStoragePolicy" validate:"required"` // An array of BlockStoragePolicy.
}
type BlockStoragePolicy ¶
type BlockStoragePolicy struct {
BlockStoragePolicy BlockStoragePolicyProperties `json:"BlockStoragePolicy" validate:"required"` // An BlockStoragePolicy.
}
type BlockStoragePolicyProperties ¶
type BlockStoragePolicyProperties struct { Id int64 `json:"id" validate:"required"` // Policy ID. Name string `json:"name" validate:"required"` // Policy Name. StorageTypes []string `json:"storageTypes" validate:"required"` // An array of storage types for block placement. ReplicationFallbacks []string `json:"replicationFallbacks" validate:"required"` // An array of fallback storage types for replication. CreationFallbacks []string `json:"creationFallbacks" validate:"required"` // An array of fallback storage types for file creation. CopyOnCreate bool `json:"copyOnCreateFile" validate:"required"` // If set then the policy cannot be changed after file creation. }
type CSRF ¶
type CSRF struct { // Name X-XSRF-HEADER // Description The name of a custom header that HTTP requests must send when protection against cross-site request forgery (CSRF) is enabled for WebHDFS by setting dfs.webhdfs.rest-csrf.enabled to true. // Type String // Default Value null // Valid Values Any valid username. // Syntax Any string. XXsrfHeader *string }
type CancelDelegationTokenRequest ¶
type CancelDelegationTokenRequest struct { Authentication ProxyUser CSRF HttpRequest // Name token // Description The delegation token used for the operation. // Type String // Default Value <empty> // Valid Values An encoded token. // Syntax See the note in Delegation. Token *string `json:"token,omitempty"` }
func (*CancelDelegationTokenRequest) RawPath ¶
func (req *CancelDelegationTokenRequest) RawPath() string
func (*CancelDelegationTokenRequest) RawQuery ¶
func (req *CancelDelegationTokenRequest) RawQuery() string
type CancelDelegationTokenResponse ¶
type CancelDelegationTokenResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*CancelDelegationTokenResponse) UnmarshalHTTP ¶
func (resp *CancelDelegationTokenResponse) UnmarshalHTTP(httpResp *http.Response) error
type CheckAccessRequest ¶
type CheckAccessRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Fs Action // Name fsaction // Description File system operation read/write/execute // Type String // Default Value null (an invalid value) // Valid Values Strings matching regex pattern "[r-][w-][x-] " // Syntax "[r-][w-][x-] " // See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Fs_Action Fsaction *string `validate:"required"` }
func (*CheckAccessRequest) RawPath ¶
func (req *CheckAccessRequest) RawPath() string
func (*CheckAccessRequest) RawQuery ¶
func (req *CheckAccessRequest) RawQuery() string
type CheckAccessResponse ¶
type CheckAccessResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*CheckAccessResponse) UnmarshalHTTP ¶
func (resp *CheckAccessResponse) UnmarshalHTTP(httpResp *http.Response) error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AllowSnapshot ¶
func (c *Client) AllowSnapshot(req *AllowSnapshotRequest) (*AllowSnapshotResponse, error)
Renew Delegation Token See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Renew_Delegation_Token expire time set by server "dfs.namenode.delegation.token.max-lifetime" See: https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml#dfs.namenode.delegation.token.max-lifetime
func (*Client) AllowSnapshotWithContext ¶ added in v0.0.2
func (c *Client) AllowSnapshotWithContext(ctx context.Context, req *AllowSnapshotRequest) (*AllowSnapshotResponse, error)
func (*Client) Append ¶
func (c *Client) Append(req *AppendRequest) (*AppendResponse, error)
Append to a File See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Append_to_a_File
func (*Client) AppendWithContext ¶ added in v0.0.2
func (c *Client) AppendWithContext(ctx context.Context, req *AppendRequest) (*AppendResponse, error)
func (*Client) ApplyOptions ¶
func (o *Client) ApplyOptions(options ...ClientOption) *Client
func (*Client) CancelDelegationToken ¶
func (c *Client) CancelDelegationToken(req *CancelDelegationTokenRequest) (*CancelDelegationTokenResponse, error)
Renew Delegation Token See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Renew_Delegation_Token expire time set by server "dfs.namenode.delegation.token.max-lifetime" See: https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml#dfs.namenode.delegation.token.max-lifetime
func (*Client) CancelDelegationTokenWithContext ¶ added in v0.0.2
func (c *Client) CancelDelegationTokenWithContext(ctx context.Context, req *CancelDelegationTokenRequest) (*CancelDelegationTokenResponse, error)
func (*Client) CheckAccess ¶
func (c *Client) CheckAccess(req *CheckAccessRequest) (*CheckAccessResponse, error)
Check access See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Check_access
func (*Client) CheckAccessWithContext ¶ added in v0.0.2
func (c *Client) CheckAccessWithContext(ctx context.Context, req *CheckAccessRequest) (*CheckAccessResponse, error)
func (*Client) Concat ¶
func (c *Client) Concat(req *ConcatRequest) (*ConcatResponse, error)
Concat File(s) See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Concat_File(s) Also see: https://issues.apache.org/jira/browse/HDFS-6641 the pre-conditions of HDFS concat right now are:
All source files must be in the same directory. Replication and block size must be the same for all source files. All blocks must be full in all source files except the last source file. In the last source file, all blocks must be full except the last block.
func (*Client) ConcatWithContext ¶ added in v0.0.2
func (c *Client) ConcatWithContext(ctx context.Context, req *ConcatRequest) (*ConcatResponse, error)
func (*Client) Create ¶
func (c *Client) Create(req *CreateRequest) (*CreateResponse, error)
Create and Write to a File If no permissions are specified, the newly created file will be assigned with default 644 permission. No umask mode will be applied from server side (so “fs.permissions.umask-mode” value configuration set on Namenode side will have no effect). Parent Dirs will be created automatically. See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Create_and_Write_to_a_File
func (*Client) CreateSnapshot ¶
func (c *Client) CreateSnapshot(req *CreateSnapshotRequest) (*CreateSnapshotResponse, error)
Create Snapshot See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Create_Snapshot
func (*Client) CreateSnapshotWithContext ¶ added in v0.0.2
func (c *Client) CreateSnapshotWithContext(ctx context.Context, req *CreateSnapshotRequest) (*CreateSnapshotResponse, error)
func (*Client) CreateSymlink ¶
func (c *Client) CreateSymlink(req *CreateSymlinkRequest) (*CreateSymlinkResponse, error)
Create a Symbolic Link See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Create_a_Symbolic_Link
func (*Client) CreateSymlinkWithContext ¶ added in v0.0.2
func (c *Client) CreateSymlinkWithContext(ctx context.Context, req *CreateSymlinkRequest) (*CreateSymlinkResponse, error)
func (*Client) CreateWithContext ¶ added in v0.0.2
func (c *Client) CreateWithContext(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
func (*Client) Delete ¶
func (c *Client) Delete(req *DeleteRequest) (*DeleteResponse, error)
Delete a File/Directory See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Delete_a_File.2FDirectory
func (*Client) DeleteSnapshot ¶
func (c *Client) DeleteSnapshot(req *DeleteSnapshotRequest) (*DeleteSnapshotResponse, error)
Delete Snapshot See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Delete_Snapshot
func (*Client) DeleteSnapshotWithContext ¶ added in v0.0.2
func (c *Client) DeleteSnapshotWithContext(ctx context.Context, req *DeleteSnapshotRequest) (*DeleteSnapshotResponse, error)
func (*Client) DeleteWithContext ¶ added in v0.0.2
func (c *Client) DeleteWithContext(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
func (*Client) DisableECPolicy ¶
func (c *Client) DisableECPolicy(req *DisableECPolicyRequest) (*DisableECPolicyResponse, error)
Disable EC Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Disable_EC_Policy
func (*Client) DisableECPolicyWithContext ¶ added in v0.0.2
func (c *Client) DisableECPolicyWithContext(ctx context.Context, req *DisableECPolicyRequest) (*DisableECPolicyResponse, error)
func (*Client) DisallowSnapshot ¶
func (c *Client) DisallowSnapshot(req *DisallowSnapshotRequest) (*DisallowSnapshotResponse, error)
Renew Delegation Token See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Renew_Delegation_Token expire time set by server "dfs.namenode.delegation.token.max-lifetime" See: https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml#dfs.namenode.delegation.token.max-lifetime
func (*Client) DisallowSnapshotWithContext ¶ added in v0.0.2
func (c *Client) DisallowSnapshotWithContext(ctx context.Context, req *DisallowSnapshotRequest) (*DisallowSnapshotResponse, error)
func (*Client) EnableECPolicy ¶
func (c *Client) EnableECPolicy(req *EnableECPolicyRequest) (*EnableECPolicyResponse, error)
Enable EC Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Enable_EC_Policy
func (*Client) EnableECPolicyWithContext ¶ added in v0.0.2
func (c *Client) EnableECPolicyWithContext(ctx context.Context, req *EnableECPolicyRequest) (*EnableECPolicyResponse, error)
func (*Client) GetAllStoragePolicy ¶
func (c *Client) GetAllStoragePolicy(req *GetAllStoragePolicyRequest) (*GetAllStoragePolicyResponse, error)
Get all Storage Policies See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_all_Storage_Policies
func (*Client) GetAllStoragePolicyWithContext ¶ added in v0.0.2
func (c *Client) GetAllStoragePolicyWithContext(ctx context.Context, req *GetAllStoragePolicyRequest) (*GetAllStoragePolicyResponse, error)
func (*Client) GetAllXAttrs ¶
func (c *Client) GetAllXAttrs(req *GetAllXAttrsRequest) (*GetAllXAttrsResponse, error)
Get all XAttrs See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_all_XAttrs
func (*Client) GetAllXAttrsWithContext ¶ added in v0.0.2
func (c *Client) GetAllXAttrsWithContext(ctx context.Context, req *GetAllXAttrsRequest) (*GetAllXAttrsResponse, error)
func (*Client) GetContentSummary ¶
func (c *Client) GetContentSummary(req *GetContentSummaryRequest) (*GetContentSummaryResponse, error)
Get Content Summary of a Directory See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_Content_Summary_of_a_Directory
func (*Client) GetContentSummaryWithContext ¶ added in v0.0.2
func (c *Client) GetContentSummaryWithContext(ctx context.Context, req *GetContentSummaryRequest) (*GetContentSummaryResponse, error)
func (*Client) GetDelegationToken ¶
func (c *Client) GetDelegationToken(req *GetDelegationTokenRequest) (*GetDelegationTokenResponse, error)
Get Delegation Token See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_Delegation_Token expire time set by server "dfs.namenode.delegation.token.max-lifetime" See: https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml#dfs.namenode.delegation.token.max-lifetime
func (*Client) GetDelegationTokenWithContext ¶ added in v0.0.2
func (c *Client) GetDelegationTokenWithContext(ctx context.Context, req *GetDelegationTokenRequest) (*GetDelegationTokenResponse, error)
func (*Client) GetECPolicy ¶
func (c *Client) GetECPolicy(req *GetECPolicyRequest) (*GetECPolicyResponse, error)
Get EC Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_EC_Policy
func (*Client) GetECPolicyWithContext ¶ added in v0.0.2
func (c *Client) GetECPolicyWithContext(ctx context.Context, req *GetECPolicyRequest) (*GetECPolicyResponse, error)
func (*Client) GetFileBlockLocations ¶
func (c *Client) GetFileBlockLocations(req *GetFileBlockLocationsRequest) (*GetFileBlockLocationsResponse, error)
Get File Block Locations See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_File_Block_Locations
func (*Client) GetFileBlockLocationsWithContext ¶ added in v0.0.2
func (c *Client) GetFileBlockLocationsWithContext(ctx context.Context, req *GetFileBlockLocationsRequest) (*GetFileBlockLocationsResponse, error)
func (*Client) GetFileChecksum ¶
func (c *Client) GetFileChecksum(req *GetFileChecksumRequest) (*GetFileChecksumResponse, error)
Get File Checksum See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_File_Checksum
func (*Client) GetFileChecksumWithContext ¶ added in v0.0.2
func (c *Client) GetFileChecksumWithContext(ctx context.Context, req *GetFileChecksumRequest) (*GetFileChecksumResponse, error)
func (*Client) GetFileStatus ¶
func (c *Client) GetFileStatus(req *GetFileStatusRequest) (*GetFileStatusResponse, error)
Status of a File/Directory See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Status_of_a_File.2FDirectory
func (*Client) GetFileStatusWithContext ¶ added in v0.0.2
func (c *Client) GetFileStatusWithContext(ctx context.Context, req *GetFileStatusRequest) (*GetFileStatusResponse, error)
func (*Client) GetHomeDirectory ¶
func (c *Client) GetHomeDirectory(req *GetHomeDirectoryRequest) (*GetHomeDirectoryResponse, error)
Get Home Directory See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_Home_Directory
func (*Client) GetHomeDirectoryWithContext ¶ added in v0.0.2
func (c *Client) GetHomeDirectoryWithContext(ctx context.Context, req *GetHomeDirectoryRequest) (*GetHomeDirectoryResponse, error)
func (*Client) GetQuotaUsage ¶
func (c *Client) GetQuotaUsage(req *GetQuotaUsageRequest) (*GetQuotaUsageResponse, error)
Get Quota Usage of a Directory See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_Quota_Usage_of_a_Directory
func (*Client) GetQuotaUsageWithContext ¶ added in v0.0.2
func (c *Client) GetQuotaUsageWithContext(ctx context.Context, req *GetQuotaUsageRequest) (*GetQuotaUsageResponse, error)
func (*Client) GetSnapshotDiff ¶
func (c *Client) GetSnapshotDiff(req *GetSnapshotDiffRequest) (*GetSnapshotDiffResponse, error)
Get Snapshot Diff See also: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_Snapshot_Diff
func (*Client) GetSnapshotDiffWithContext ¶ added in v0.0.2
func (c *Client) GetSnapshotDiffWithContext(ctx context.Context, req *GetSnapshotDiffRequest) (*GetSnapshotDiffResponse, error)
func (*Client) GetSnapshottableDirectoryList ¶
func (c *Client) GetSnapshottableDirectoryList(req *GetSnapshottableDirectoryListRequest) (*GetSnapshottableDirectoryListResponse, error)
Get Snapshottable Directory List If the USER is not the hdfs super user, the call lists only the snapshottable directories owned by the user. If the USER is the hdfs super user, the call lists all the snapshottable directories. See also: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_Snapshottable_Directory_List
func (*Client) GetSnapshottableDirectoryListWithContext ¶ added in v0.0.2
func (c *Client) GetSnapshottableDirectoryListWithContext(ctx context.Context, req *GetSnapshottableDirectoryListRequest) (*GetSnapshottableDirectoryListResponse, error)
func (*Client) GetStoragePolicy ¶
func (c *Client) GetStoragePolicy(req *GetStoragePolicyRequest) (*GetStoragePolicyResponse, error)
Get Storage Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_Storage_Policy
func (*Client) GetStoragePolicyWithContext ¶ added in v0.0.2
func (c *Client) GetStoragePolicyWithContext(ctx context.Context, req *GetStoragePolicyRequest) (*GetStoragePolicyResponse, error)
func (*Client) GetTrashRoot ¶
func (c *Client) GetTrashRoot(req *GetTrashRootRequest) (*GetTrashRootResponse, error)
Get Trash Root See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_Trash_Root For more details about trash root in an encrypted zone, please refer to Transparent Encryption Guide. See also, https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/TransparentEncryption.html#Rename_and_Trash_considerations
func (*Client) GetTrashRootWithContext ¶ added in v0.0.2
func (c *Client) GetTrashRootWithContext(ctx context.Context, req *GetTrashRootRequest) (*GetTrashRootResponse, error)
func (*Client) GetXAttr ¶
func (c *Client) GetXAttr(req *GetXAttrRequest) (*GetXAttrResponse, error)
Get an XAttr See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_an_XAttr
func (*Client) GetXAttrWithContext ¶ added in v0.0.2
func (c *Client) GetXAttrWithContext(ctx context.Context, req *GetXAttrRequest) (*GetXAttrResponse, error)
func (*Client) GetXAttrs ¶
func (c *Client) GetXAttrs(req *GetXAttrsRequest) (*GetXAttrsResponse, error)
Get multiple XAttrs See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Get_multiple_XAttrs
func (*Client) GetXAttrsWithContext ¶ added in v0.0.2
func (c *Client) GetXAttrsWithContext(ctx context.Context, req *GetXAttrsRequest) (*GetXAttrsResponse, error)
func (*Client) HttpSchema ¶
func (*Client) ListStatus ¶
func (c *Client) ListStatus(req *ListStatusRequest) (*ListStatusResponse, error)
List a File/Directory See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#List_a_Directory
func (*Client) ListStatusBatch ¶
func (c *Client) ListStatusBatch(req *ListStatusBatchRequest) (*ListStatusBatchResponse, error)
Iteratively List a Directory https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Iteratively_List_a_Directory If remainingEntries is non-zero, there are additional entries in the directory. To query the next batch, set the startAfter parameter to the pathSuffix of the last item returned in the current batch. Batch size is controlled by the dfs.ls.limit option on the NameNode.
func (*Client) ListStatusBatchWithContext ¶ added in v0.0.2
func (c *Client) ListStatusBatchWithContext(ctx context.Context, req *ListStatusBatchRequest) (*ListStatusBatchResponse, error)
func (*Client) ListStatusWithContext ¶ added in v0.0.2
func (c *Client) ListStatusWithContext(ctx context.Context, req *ListStatusRequest) (*ListStatusResponse, error)
func (*Client) ListXAttrs ¶
func (c *Client) ListXAttrs(req *ListXAttrsRequest) (*ListXAttrsResponse, error)
List all XAttrs See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#List_all_XAttrs
func (*Client) ListXAttrsWithContext ¶ added in v0.0.2
func (c *Client) ListXAttrsWithContext(ctx context.Context, req *ListXAttrsRequest) (*ListXAttrsResponse, error)
func (*Client) Mkdirs ¶
func (c *Client) Mkdirs(req *MkdirsRequest) (*MkdirsResponse, error)
Make a Directory If no permissions are specified, the newly created directory will have 755 permission as default. No umask mode will be applied from server side (so “fs.permissions.umask-mode” value configuration set on Namenode side will have no effect). See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Make_a_Directory
func (*Client) MkdirsWithContext ¶ added in v0.0.2
func (c *Client) MkdirsWithContext(ctx context.Context, req *MkdirsRequest) (*MkdirsResponse, error)
func (*Client) Open ¶
func (c *Client) Open(req *OpenRequest) (*OpenResponse, error)
Open and Read a File See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Open_and_Read_a_File
func (*Client) OpenWithContext ¶ added in v0.0.2
func (c *Client) OpenWithContext(ctx context.Context, req *OpenRequest) (*OpenResponse, error)
func (*Client) ProxyUser ¶ added in v0.0.8
ProxyUser returns the authenticated user, may be needed as 'user.name' to authenticate See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Authentication
func (*Client) RemoveXAttr ¶
func (c *Client) RemoveXAttr(req *RemoveXAttrRequest) (*RemoveXAttrResponse, error)
Remove XAttr See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Remove_XAttr
func (*Client) RemoveXAttrWithContext ¶ added in v0.0.2
func (c *Client) RemoveXAttrWithContext(ctx context.Context, req *RemoveXAttrRequest) (*RemoveXAttrResponse, error)
func (*Client) Rename ¶
func (c *Client) Rename(req *RenameRequest) (*RenameResponse, error)
Rename a File/Directory See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Rename_a_File.2FDirectory
func (*Client) RenameSnapshot ¶
func (c *Client) RenameSnapshot(req *RenameSnapshotRequest) (*RenameSnapshotResponse, error)
Create Snapshot See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Create_Snapshot
func (*Client) RenameSnapshotWithContext ¶ added in v0.0.2
func (c *Client) RenameSnapshotWithContext(ctx context.Context, req *RenameSnapshotRequest) (*RenameSnapshotResponse, error)
func (*Client) RenameWithContext ¶ added in v0.0.2
func (c *Client) RenameWithContext(ctx context.Context, req *RenameRequest) (*RenameResponse, error)
func (*Client) RenewDelegationToken ¶
func (c *Client) RenewDelegationToken(req *RenewDelegationTokenRequest) (*RenewDelegationTokenResponse, error)
Renew Delegation Token See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Renew_Delegation_Token expire time set by server "dfs.namenode.delegation.token.max-lifetime" See: https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml#dfs.namenode.delegation.token.max-lifetime
func (*Client) RenewDelegationTokenWithContext ¶ added in v0.0.2
func (c *Client) RenewDelegationTokenWithContext(ctx context.Context, req *RenewDelegationTokenRequest) (*RenewDelegationTokenResponse, error)
func (*Client) SatisfyStoragePolicy ¶
func (c *Client) SatisfyStoragePolicy(req *SatisfyStoragePolicyRequest) (*SatisfyStoragePolicyResponse, error)
Satisfy Storage Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Satisfy_Storage_Policy
func (*Client) SatisfyStoragePolicyWithContext ¶ added in v0.0.2
func (c *Client) SatisfyStoragePolicyWithContext(ctx context.Context, req *SatisfyStoragePolicyRequest) (*SatisfyStoragePolicyResponse, error)
func (*Client) SetECPolicy ¶
func (c *Client) SetECPolicy(req *SetECPolicyRequest) (*SetECPolicyResponse, error)
Set EC Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Set_EC_Policy
func (*Client) SetECPolicyWithContext ¶ added in v0.0.2
func (c *Client) SetECPolicyWithContext(ctx context.Context, req *SetECPolicyRequest) (*SetECPolicyResponse, error)
func (*Client) SetOwner ¶
func (c *Client) SetOwner(req *SetOwnerRequest) (*SetOwnerResponse, error)
Set Owner See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Set_Owner
func (*Client) SetOwnerWithContext ¶ added in v0.0.2
func (c *Client) SetOwnerWithContext(ctx context.Context, req *SetOwnerRequest) (*SetOwnerResponse, error)
func (*Client) SetPermission ¶
func (c *Client) SetPermission(req *SetPermissionRequest) (*SetPermissionResponse, error)
Set Permission See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Set_Permission
func (*Client) SetPermissionWithContext ¶ added in v0.0.2
func (c *Client) SetPermissionWithContext(ctx context.Context, req *SetPermissionRequest) (*SetPermissionResponse, error)
func (*Client) SetReplication ¶
func (c *Client) SetReplication(req *SetReplicationRequest) (*SetReplicationResponse, error)
Replication See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Replication
func (*Client) SetReplicationWithContext ¶ added in v0.0.2
func (c *Client) SetReplicationWithContext(ctx context.Context, req *SetReplicationRequest) (*SetReplicationResponse, error)
func (*Client) SetStoragePolicy ¶
func (c *Client) SetStoragePolicy(req *SetStoragePolicyRequest) (*SetStoragePolicyResponse, error)
Set Storage Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Set_Storage_Policy
func (*Client) SetStoragePolicyWithContext ¶ added in v0.0.2
func (c *Client) SetStoragePolicyWithContext(ctx context.Context, req *SetStoragePolicyRequest) (*SetStoragePolicyResponse, error)
func (*Client) SetTimes ¶
func (c *Client) SetTimes(req *SetTimesRequest) (*SetTimesResponse, error)
Set Access or Modification Time See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Set_Access_or_Modification_Time
func (*Client) SetTimesWithContext ¶ added in v0.0.2
func (c *Client) SetTimesWithContext(ctx context.Context, req *SetTimesRequest) (*SetTimesResponse, error)
func (*Client) SetXAttr ¶
func (c *Client) SetXAttr(req *SetXAttrRequest) (*SetXAttrResponse, error)
Set XAttr See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Set_XAttr
func (*Client) SetXAttrWithContext ¶ added in v0.0.2
func (c *Client) SetXAttrWithContext(ctx context.Context, req *SetXAttrRequest) (*SetXAttrResponse, error)
func (*Client) Truncate ¶
func (c *Client) Truncate(req *TruncateRequest) (*TruncateResponse, error)
Truncate a File See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Truncate_a_File
func (*Client) TruncateWithContext ¶ added in v0.0.2
func (c *Client) TruncateWithContext(ctx context.Context, req *TruncateRequest) (*TruncateResponse, error)
func (*Client) UnsetECPolicy ¶
func (c *Client) UnsetECPolicy(req *UnsetECPolicyRequest) (*UnsetECPolicyResponse, error)
Unset EC Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Unset_EC_Policy
func (*Client) UnsetECPolicyWithContext ¶ added in v0.0.2
func (c *Client) UnsetECPolicyWithContext(ctx context.Context, req *UnsetECPolicyRequest) (*UnsetECPolicyResponse, error)
func (*Client) UnsetStoragePolicy ¶
func (c *Client) UnsetStoragePolicy(req *UnsetStoragePolicyRequest) (*UnsetStoragePolicyResponse, error)
Unset Storage Policy See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Unset_Storage_Policy
func (*Client) UnsetStoragePolicyWithContext ¶ added in v0.0.2
func (c *Client) UnsetStoragePolicyWithContext(ctx context.Context, req *UnsetStoragePolicyRequest) (*UnsetStoragePolicyResponse, error)
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
A ClientOption sets options.
func WithDisableSSL ¶
func WithDisableSSL(disableSSL bool) ClientOption
func WithHttpClient ¶
func WithHttpClient(httpCli *http.Client) ClientOption
func WithKerberosCCache ¶
func WithKerberosCCacheFile ¶
func WithKerberosConfig ¶ added in v0.0.2
func WithKerberosConfig(kerberosConfig *kerberos.Config) ClientOption
func WithKerberosKeytab ¶
func WithKerberosKeytabFile ¶
func WithKerberosPassword ¶
func WithValidator ¶
func WithValidator(v *validator.Validate) ClientOption
type ClientOptionFunc ¶
type ClientOptionFunc func(*Client)
ClientOptionFunc wraps a function that modifies Client into an implementation of the ClientOption interface.
type CompletedConfig ¶
type CompletedConfig struct {
// contains filtered or unexported fields
}
type ConcatRequest ¶
type ConcatRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name sources // Description A list of source paths. // Type String // Default Value <empty> // Valid Values A list of comma seperated absolute FileSystem paths without scheme and authority. // Syntax Any string. Sources *string }
func (*ConcatRequest) RawPath ¶
func (req *ConcatRequest) RawPath() string
func (*ConcatRequest) RawQuery ¶
func (req *ConcatRequest) RawQuery() string
type ConcatResponse ¶
type ConcatResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*ConcatResponse) UnmarshalHTTP ¶
func (resp *ConcatResponse) UnmarshalHTTP(httpResp *http.Response) error
type Config ¶
type Config struct { // Addresses specifies the namenode(s) to connect to. Addresses []string `validate:"required"` // The authenticated user Username *string // Set this to `true` to disable SSL when sending requests. Defaults // to `false`. DisableSSL bool HttpConfig *http_.Config `validate:"dive"` Validator *validator.Validate }
Config Code borrowed from https://github.com/kubernetes/kubernetes call chains: NewConfig -> Complete -> [Validate] -> New|Apply
func (*Config) Complete ¶
func (o *Config) Complete() CompletedConfig
Complete fills in any fields not set that are required to have valid data and can be derived from other fields. If you're going to ApplyOptions, do that first. It's mutating the receiver.
type ContentSummary ¶
type ContentSummary struct { // If Path is a File, then DirectoryCount == 0 // If Path is a Directory, then the Path is included as '.', DirectoryCount == len(subdirs) + 1(.) DirectoryCount int64 `json:"directoryCount" validate:"required"` // The number of directories. FileCount int64 `json:"fileCount" validate:"required"` // The number of files. // Length is the total size of the named path, including any subdirectories. Length int64 `json:"length" validate:"required"` // The number of bytes used by the content. Quota int64 `json:"quota" validate:"required"` // The namespace quota of this directory. // SpaceConsumed is the total size of the named path, including any // subdirectories. Unlike Length, it counts the total replicated size of each // file, and represents the total on-disk footprint64 for a tree in HDFS. SpaceConsumed int64 `json:"spaceConsumed" validate:"required"` // The disk space consumed by the content. SpaceQuota int64 `json:"spaceQuota" validate:"required"` // The disk space quota. TypeQuota TypeQuota `json:"typeQuota" validate:"required"` }
type CreateRequest ¶
type CreateRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Object data. Body io.Reader // ContentLength records the length of the associated content. // The value -1 indicates that the length is unknown. // Values >= 0 indicate that the given number of bytes may // be read from Body. // // For client requests, a value of 0 with a non-nil Body is // also treated as unknown. // For HttpFs, ContentType and ContentLength is needed with a non-nil Body // ContentLength will be computed inner when Body is one of type [*bytes.Buffer, *bytes.Reader, *strings.Reader] // See https://issues.cloudera.org/browse/HUE-679 // Missing or unknown request method // Missing URL // Missing HTTP Identifier (HTTP/1.0) // Request is too large // Content-Length missing for POST or PUT requests // Illegal character in hostname; underscores are not allowed ContentLength *int64 // Name overwrite // Description If a file already exists, should it be overwritten? // Type boolean // Default Value false // Valid Values true // Syntax true // Actually, HttpFS default to true Overwrite *bool // Name blocksize // Description The block size of a file. // Type long // Default Value Specified in the configuration. // Valid Values > 0 // Syntax Any integer. Blocksize *int64 // Name replication // Description The number of replications of a file. // Type short // Default Value Specified in the configuration. // Valid Values > 0 // Syntax Any integer. Replication *int // Name permission // Description The permission of a file/directory. // Type Octal // Default Value 644 for files, 755 for directories // Valid Values 0 - 1777 // Syntax Any radix-8 integer (leading zeros may be omitted.) Permission *int // Name buffersize // Description The size of the buffer used in transferring data. // Type int // Default Value Specified in the configuration. // Valid Values > 0 // Syntax Any integer. BufferSize *int // Name nodirect // Description Disable automatically redirected. // Type bool // Default Value false // Valid Values true|false // Syntax Any Bool. NoDirect *bool }
func (*CreateRequest) RawPath ¶
func (req *CreateRequest) RawPath() string
func (*CreateRequest) RawQuery ¶
func (req *CreateRequest) RawQuery() string
type CreateResponse ¶
type CreateResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` NoDirect bool `json:"-"` Location *string `json:"Location"` }
func (*CreateResponse) UnmarshalHTTP ¶
func (resp *CreateResponse) UnmarshalHTTP(httpResp *http.Response) error
type CreateSnapshotRequest ¶
type CreateSnapshotRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name snapshotname // Description The name of the snapshot to be created/deleted. Or the new name for snapshot rename. // Type String // Default Value null // Valid Values Any valid snapshot name. // Syntax Any string. // See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Snapshot_Name Snapshotname *string `json:"snapshotname,omitempty"` }
func (*CreateSnapshotRequest) RawPath ¶
func (req *CreateSnapshotRequest) RawPath() string
func (*CreateSnapshotRequest) RawQuery ¶
func (req *CreateSnapshotRequest) RawQuery() string
type CreateSnapshotResponse ¶
type CreateSnapshotResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` // Path of the object to get. // // Path is a required field Path *string }
func (*CreateSnapshotResponse) UnmarshalHTTP ¶
func (resp *CreateSnapshotResponse) UnmarshalHTTP(httpResp *http.Response) error
type CreateSymlinkRequest ¶
type CreateSymlinkRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name destination // Description The destination path. // Type Path // Default Value <empty> (an invalid path) // Valid Values An absolute FileSystem path without scheme and authority. // Syntax Any path. Destination *string `validate:"required"` // Name createparent // Description If the parent directories do not exist, should they be created? // Type boolean // Default Value true // Valid Values true, false // Syntax true CreateParent *bool }
func (*CreateSymlinkRequest) RawPath ¶
func (req *CreateSymlinkRequest) RawPath() string
func (*CreateSymlinkRequest) RawQuery ¶
func (req *CreateSymlinkRequest) RawQuery() string
type CreateSymlinkResponse ¶
type CreateSymlinkResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*CreateSymlinkResponse) UnmarshalHTTP ¶
func (resp *CreateSymlinkResponse) UnmarshalHTTP(httpResp *http.Response) error
type DeleteRequest ¶
type DeleteRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name recursive // Description Should the operation act on the content in the subdirectories? // Type boolean // Default Value false // Valid Values true // Syntax true Recursive *bool }
func (*DeleteRequest) RawPath ¶
func (req *DeleteRequest) RawPath() string
func (*DeleteRequest) RawQuery ¶
func (req *DeleteRequest) RawQuery() string
type DeleteResponse ¶
type DeleteResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` // False if file not exist // True if file existed and deleted by this API Boolean Boolean `json:"boolean"` }
func (*DeleteResponse) UnmarshalHTTP ¶
func (resp *DeleteResponse) UnmarshalHTTP(httpResp *http.Response) error
type DeleteSnapshotRequest ¶
type DeleteSnapshotRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name snapshotname // Description The name of the snapshot to be created/deleted. Or the new name for snapshot rename. // Type String // Default Value null // Valid Values Any valid snapshot name. // Syntax Any string. // See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Snapshot_Name Snapshotname *string `json:"snapshotname,omitempty" validate:"required"` }
func (*DeleteSnapshotRequest) RawPath ¶
func (req *DeleteSnapshotRequest) RawPath() string
func (*DeleteSnapshotRequest) RawQuery ¶
func (req *DeleteSnapshotRequest) RawQuery() string
type DeleteSnapshotResponse ¶
type DeleteSnapshotResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*DeleteSnapshotResponse) UnmarshalHTTP ¶
func (resp *DeleteSnapshotResponse) UnmarshalHTTP(httpResp *http.Response) error
type DiffReportEntry ¶
type DiffReportEntry struct { SourcePath string `json:"sourcePath" validate:"required"` // Source path name relative to snapshot root. TargetPath string `json:"targetPath" validate:"required"` // Target path relative to snapshot root used for renames. Type DiffReportEntryType `json:"type" validate:"required"` // Type of diff report entry`["CREATE", "MODIFY", "DELETE", "RENAME"] }
type DiffReportEntryType ¶
type DiffReportEntryType string
const ( DiffReportEntryTypeCreate DiffReportEntryType = "CREATE" DiffReportEntryTypeModify DiffReportEntryType = "MODIFY" DiffReportEntryTypeDelete DiffReportEntryType = "DELETE" DiffReportEntryTypeRename DiffReportEntryType = "RENAME" )
type DirectoryListing ¶
type DirectoryListing struct { PartialListing struct { FileStatuses FileStatuses `json:"FileStatuses"` // An array of FileStatus } `json:"partialListing" validate:"required"` // A partial directory listing RemainingEntries int64 `json:"remainingEntries" validate:"required"` // Number of remaining entries }
A DirectoryListing JSON object represents a batch of directory entries while iteratively listing a directory. It contains a FileStatuses JSON object as well as iteration information. See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#DirectoryListing_JSON_Schema
type DisableECPolicyRequest ¶
type DisableECPolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Name ecpolicy, Erasure Coding Policy // Description The name of the erasure coding policy. // Type String // Default Value <empty> // Valid Values Any valid erasure coding policy name; // Syntax Any string. ECPolicy *string `validate:"required"` }
func (*DisableECPolicyRequest) RawPath ¶
func (req *DisableECPolicyRequest) RawPath() string
func (*DisableECPolicyRequest) RawQuery ¶
func (req *DisableECPolicyRequest) RawQuery() string
type DisableECPolicyResponse ¶
type DisableECPolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*DisableECPolicyResponse) UnmarshalHTTP ¶
func (resp *DisableECPolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type DisallowSnapshotRequest ¶
type DisallowSnapshotRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*DisallowSnapshotRequest) RawPath ¶
func (req *DisallowSnapshotRequest) RawPath() string
func (*DisallowSnapshotRequest) RawQuery ¶
func (req *DisallowSnapshotRequest) RawQuery() string
type DisallowSnapshotResponse ¶
type DisallowSnapshotResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*DisallowSnapshotResponse) UnmarshalHTTP ¶
func (resp *DisallowSnapshotResponse) UnmarshalHTTP(httpResp *http.Response) error
type ECPolicy ¶
type ECPolicy struct { Name string `json:"name"` Schema ECPolicySchema `json:"schema"` CellSize int64 `json:"cellSize"` Id int64 `json:"id"` Codecname string `json:"codecname"` NumDataUnits int64 `json:"numDataUnits"` NumParityUnits int64 `json:"numParityUnits"` Replicationpolicy bool `json:"replicationpolicy"` SystemPolicy bool `json:"systemPolicy"` }
type ECPolicySchema ¶
type EmptyClientOption ¶
type EmptyClientOption struct{}
EmptyClientOption does not alter the configuration. It can be embedded in another structure to build custom options.
This API is EXPERIMENTAL.
type EnableECPolicyRequest ¶
type EnableECPolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Name ecpolicy, Erasure Coding Policy // Description The name of the erasure coding policy. // Type String // Default Value <empty> // Valid Values Any valid erasure coding policy name; // Syntax Any string. ECPolicy *string `validate:"required"` }
func (*EnableECPolicyRequest) RawPath ¶
func (req *EnableECPolicyRequest) RawPath() string
func (*EnableECPolicyRequest) RawQuery ¶
func (req *EnableECPolicyRequest) RawQuery() string
type EnableECPolicyResponse ¶
type EnableECPolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*EnableECPolicyResponse) UnmarshalHTTP ¶
func (resp *EnableECPolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type ErrorResponse ¶
type ErrorResponse struct {
RemoteException *RemoteException `json:"RemoteException"`
}
https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Error_Responses
func (ErrorResponse) Exception ¶
func (e ErrorResponse) Exception() error
type FileChecksum ¶
type FileChecksum struct { Algorithm string `json:"algorithm" validate:"required"` // The name of the checksum algorithm. Bytes string `json:"bytes" validate:"required"` // The byte sequence of the checksum in hexadecimal. Length int64 `json:"length" validate:"required"` // The length of the bytes (not the length of the string). }
type FileStatus ¶
type FileStatus = FileStatusProperties
type FileStatusProperties ¶
type FileStatusProperties struct { PathPrefix string `json:"-"` // The path prefix, for current file|fir AccessTime time_.UnixTimeMillisecond `json:"accessTime" validate:"required"` // The access time. BlockSize int64 `json:"blockSize" validate:"required"` // The block size of a file. ChildrenNum int64 `json:"childrenNum"` // The number of sub files or dirs FileId int64 `json:"fileId"` // The file id Group string `json:"group" validate:"required"` // The group owner. Length int64 `json:"length" validate:"required"` // The number of bytes in a file. in bytes, zero for directories ModificationTime time_.UnixTimeMillisecond `json:"modificationTime" validate:"required"` // The modification time. Owner string `json:"owner" validate:"required"` // The user who is the owner. PathSuffix string `json:"pathSuffix" validate:"required"` // The path suffix. for subfile|subdir Permission Permission `json:"permission" validate:"required"` // The permission represented as a octal string. Replication int64 `json:"replication" validate:"required"` // The number of replication of a file. Symlink string `json:"symlink"` // The link target of a symlink. Type FileType `json:"type" validate:"required"` // The type of the path object. ["FILE", "DIRECTORY", "SYMLINK"] }
JavaScript syntax is used to define fileStatusProperties so that it can be referred in both FileStatus and FileStatuses JSON schemas. See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#FileStatus_Properties
func (*FileStatusProperties) IsDir ¶ added in v0.0.2
func (fi *FileStatusProperties) IsDir() bool
func (*FileStatusProperties) ModTime ¶ added in v0.0.2
func (fi *FileStatusProperties) ModTime() time.Time
func (*FileStatusProperties) Mode ¶ added in v0.0.2
func (fi *FileStatusProperties) Mode() os.FileMode
func (*FileStatusProperties) Name ¶ added in v0.0.2
func (fi *FileStatusProperties) Name() string
FileStatusProperties implements os.FileInfo, and provides information about a file or directory in HDFS.
func (*FileStatusProperties) Size ¶ added in v0.0.2
func (fi *FileStatusProperties) Size() int64
func (*FileStatusProperties) Sys ¶ added in v0.0.2
func (fi *FileStatusProperties) Sys() interface{}
Sys returns the raw *FileStatusProperties message from the namenode.
type FileStatuses ¶
type FileStatuses struct {
FileStatus []FileStatus `json:"FileStatus"` // An array of FileStatus
}
func (*FileStatuses) Len ¶ added in v0.0.2
func (s *FileStatuses) Len() int
func (*FileStatuses) Less ¶ added in v0.0.2
func (s *FileStatuses) Less(i, j int) bool
func (*FileStatuses) Swap ¶ added in v0.0.2
func (s *FileStatuses) Swap(i, j int)
type GetAllStoragePolicyRequest ¶
type GetAllStoragePolicyRequest struct { Authentication ProxyUser CSRF HttpRequest }
func (*GetAllStoragePolicyRequest) RawPath ¶
func (req *GetAllStoragePolicyRequest) RawPath() string
func (*GetAllStoragePolicyRequest) RawQuery ¶
func (req *GetAllStoragePolicyRequest) RawQuery() string
type GetAllStoragePolicyResponse ¶
type GetAllStoragePolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` BlockStoragePolicies BlockStoragePolicies `json:"BlockStoragePolicies"` }
func (*GetAllStoragePolicyResponse) UnmarshalHTTP ¶
func (resp *GetAllStoragePolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetAllXAttrsRequest ¶
type GetAllXAttrsRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Encode values after retrieving them. // Valid encodings are “text”, “hex”, and “base64”. // Values encoded as text strings are enclosed in double quotes ("), // and values encoded as hexadecimal and base64 are prefixed with 0x and 0s, respectively. // actually, encoding is not required, so nil is allowed. Encoding *XAttrValueEncoding //`validate:"required"` }
func (*GetAllXAttrsRequest) RawPath ¶
func (req *GetAllXAttrsRequest) RawPath() string
func (*GetAllXAttrsRequest) RawQuery ¶
func (req *GetAllXAttrsRequest) RawQuery() string
type GetAllXAttrsResponse ¶
type GetAllXAttrsResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` XAttrs `json:"XAttrs"` // XAttr array. }
func (*GetAllXAttrsResponse) UnmarshalHTTP ¶
func (resp *GetAllXAttrsResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetContentSummaryRequest ¶
type GetContentSummaryRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*GetContentSummaryRequest) RawPath ¶
func (req *GetContentSummaryRequest) RawPath() string
func (*GetContentSummaryRequest) RawQuery ¶
func (req *GetContentSummaryRequest) RawQuery() string
type GetContentSummaryResponse ¶
type GetContentSummaryResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` ContentSummary ContentSummary `json:"ContentSummary"` }
func (*GetContentSummaryResponse) UnmarshalHTTP ¶
func (resp *GetContentSummaryResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetDelegationTokenRequest ¶
type GetDelegationTokenRequest struct { Authentication ProxyUser CSRF HttpRequest // Name renewer // Description The username of the renewer of a delegation token. // Type String // Default Value <empty> (means the current user) // Valid Values Any valid username. // Syntax Any string. Renewer *string `json:"renewer,omitempty"` // Name service // Description The name of the service where the token is supposed to be used, e.g. ip:port of the namenode // Type String // Default Value <empty> // Valid Values ip:port in string format or logical name of the service // Syntax Any string. Service *string `json:"service,omitempty"` // Name kind // Description The kind of the delegation token requested // Type String // Default Value <empty> (Server sets the default kind for the service) // Valid Values A string that represents token kind e.g “HDFS_DELEGATION_TOKEN” or “WEBHDFS delegation” // Syntax Any string. Kind *string `json:"kind,omitempty"` }
func (*GetDelegationTokenRequest) RawPath ¶
func (req *GetDelegationTokenRequest) RawPath() string
func (*GetDelegationTokenRequest) RawQuery ¶
func (req *GetDelegationTokenRequest) RawQuery() string
type GetDelegationTokenResponse ¶
type GetDelegationTokenResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` Token Token `json:"token"` }
func (*GetDelegationTokenResponse) UnmarshalHTTP ¶
func (resp *GetDelegationTokenResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetECPolicyRequest ¶
type GetECPolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*GetECPolicyRequest) RawPath ¶
func (req *GetECPolicyRequest) RawPath() string
func (*GetECPolicyRequest) RawQuery ¶
func (req *GetECPolicyRequest) RawQuery() string
type GetECPolicyResponse ¶
type GetECPolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` ECPolicy ECPolicy `json:"ECPolicy"` }
func (*GetECPolicyResponse) UnmarshalHTTP ¶
func (resp *GetECPolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetFileBlockLocationsRequest ¶
type GetFileBlockLocationsRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*GetFileBlockLocationsRequest) RawPath ¶
func (req *GetFileBlockLocationsRequest) RawPath() string
func (*GetFileBlockLocationsRequest) RawQuery ¶
func (req *GetFileBlockLocationsRequest) RawQuery() string
type GetFileBlockLocationsResponse ¶
type GetFileBlockLocationsResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` BlockLocations BlockLocations `json:"BlockLocations"` }
func (*GetFileBlockLocationsResponse) UnmarshalHTTP ¶
func (resp *GetFileBlockLocationsResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetFileChecksumRequest ¶
type GetFileChecksumRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name nodirect // Description Disable automatically redirected. // Type bool // Default Value false // Valid Values true|false // Syntax Any Bool. NoDirect *bool }
func (*GetFileChecksumRequest) RawPath ¶
func (req *GetFileChecksumRequest) RawPath() string
func (*GetFileChecksumRequest) RawQuery ¶
func (req *GetFileChecksumRequest) RawQuery() string
type GetFileChecksumResponse ¶
type GetFileChecksumResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` FileChecksum FileChecksum `json:"FileChecksum"` NoDirect bool `json:"-"` Location *string `json:"Location"` }
func (*GetFileChecksumResponse) UnmarshalHTTP ¶
func (resp *GetFileChecksumResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetFileStatusRequest ¶
type GetFileStatusRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*GetFileStatusRequest) RawPath ¶
func (req *GetFileStatusRequest) RawPath() string
func (*GetFileStatusRequest) RawQuery ¶
func (req *GetFileStatusRequest) RawQuery() string
type GetFileStatusResponse ¶
type GetFileStatusResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` FileStatus FileStatus `json:"FileStatus"` }
func (*GetFileStatusResponse) UnmarshalHTTP ¶
func (resp *GetFileStatusResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetHomeDirectoryRequest ¶
type GetHomeDirectoryRequest struct { Authentication ProxyUser CSRF HttpRequest }
func (*GetHomeDirectoryRequest) RawPath ¶
func (req *GetHomeDirectoryRequest) RawPath() string
func (*GetHomeDirectoryRequest) RawQuery ¶
func (req *GetHomeDirectoryRequest) RawQuery() string
type GetHomeDirectoryResponse ¶
type GetHomeDirectoryResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` Path string `json:"Path"` }
func (*GetHomeDirectoryResponse) UnmarshalHTTP ¶
func (resp *GetHomeDirectoryResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetQuotaUsageRequest ¶
type GetQuotaUsageRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*GetQuotaUsageRequest) RawPath ¶
func (req *GetQuotaUsageRequest) RawPath() string
func (*GetQuotaUsageRequest) RawQuery ¶
func (req *GetQuotaUsageRequest) RawQuery() string
type GetQuotaUsageResponse ¶
type GetQuotaUsageResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` QuotaUsage QuotaUsage `json:"QuotaUsage"` }
func (*GetQuotaUsageResponse) UnmarshalHTTP ¶
func (resp *GetQuotaUsageResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetSnapshotDiffRequest ¶
type GetSnapshotDiffRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name oldsnapshotname // Description The old name of the snapshot to be renamed. // Type String // Default Value null // Valid Values An existing snapshot name. // Syntax Any string. // See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Old_Snapshot_Name Oldsnapshotname *string `json:"oldsnapshotname,omitempty" validate:"required"` // Name snapshotname // Description The name of the snapshot to be created/deleted. Or the new name for snapshot rename. // Type String // Default Value null // Valid Values Any valid snapshot name. // Syntax Any string. // See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Snapshot_Name Snapshotname *string `json:"snapshotname,omitempty" validate:"required"` }
func (*GetSnapshotDiffRequest) RawPath ¶
func (req *GetSnapshotDiffRequest) RawPath() string
func (*GetSnapshotDiffRequest) RawQuery ¶
func (req *GetSnapshotDiffRequest) RawQuery() string
type GetSnapshotDiffResponse ¶
type GetSnapshotDiffResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` SnapshotDiffReport SnapshotDiffReport `json:"SnapshotDiffReport"` }
func (*GetSnapshotDiffResponse) UnmarshalHTTP ¶
func (resp *GetSnapshotDiffResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetSnapshottableDirectoryListRequest ¶
type GetSnapshottableDirectoryListRequest struct { Authentication ProxyUser CSRF HttpRequest // Name user.name // Description The authenticated user; see Authentication. // Type String // Default Value null // Valid Values Any valid username. // Syntax Any string. // See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Username Username *string `json:"user.name,omitempty" validate:"required"` }
func (*GetSnapshottableDirectoryListRequest) RawPath ¶
func (req *GetSnapshottableDirectoryListRequest) RawPath() string
func (*GetSnapshottableDirectoryListRequest) RawQuery ¶
func (req *GetSnapshottableDirectoryListRequest) RawQuery() string
type GetSnapshottableDirectoryListResponse ¶
type GetSnapshottableDirectoryListResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` SnapshottableDirectoryList SnapshottableDirectoryList `json:"SnapshottableDirectoryList" validate:"required"` // An array of SnapshottableDirectoryStatus }
func (*GetSnapshottableDirectoryListResponse) UnmarshalHTTP ¶
func (resp *GetSnapshottableDirectoryListResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetStoragePolicyRequest ¶
type GetStoragePolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string }
func (*GetStoragePolicyRequest) RawPath ¶
func (req *GetStoragePolicyRequest) RawPath() string
func (*GetStoragePolicyRequest) RawQuery ¶
func (req *GetStoragePolicyRequest) RawQuery() string
type GetStoragePolicyResponse ¶
type GetStoragePolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` BlockStoragePolicy }
func (*GetStoragePolicyResponse) UnmarshalHTTP ¶
func (resp *GetStoragePolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetTrashRootRequest ¶
type GetTrashRootRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*GetTrashRootRequest) RawPath ¶
func (req *GetTrashRootRequest) RawPath() string
func (*GetTrashRootRequest) RawQuery ¶
func (req *GetTrashRootRequest) RawQuery() string
type GetTrashRootResponse ¶
type GetTrashRootResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` Path string `json:"Path"` }
func (*GetTrashRootResponse) UnmarshalHTTP ¶
func (resp *GetTrashRootResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetXAttrRequest ¶
type GetXAttrRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // XAttr Name // Name xattr.name // Description The XAttr name of a file/directory. // Type String // Default Value <empty> // Valid Values Any string prefixed with user./trusted./system./security.. // Syntax Any string prefixed with user./trusted./system./security.. XAttrName *string `validate:"required"` // Encode values after retrieving them. // Valid encodings are “text”, “hex”, and “base64”. // Values encoded as text strings are enclosed in double quotes ("), // and values encoded as hexadecimal and base64 are prefixed with 0x and 0s, respectively. // actually, encoding is not required, so nil is allowed. Encoding *XAttrValueEncoding //`validate:"required"` }
func (*GetXAttrRequest) RawPath ¶
func (req *GetXAttrRequest) RawPath() string
func (*GetXAttrRequest) RawQuery ¶
func (req *GetXAttrRequest) RawQuery() string
type GetXAttrResponse ¶
type GetXAttrResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` XAttrs `json:"XAttrs"` // XAttr array. }
func (*GetXAttrResponse) UnmarshalHTTP ¶
func (resp *GetXAttrResponse) UnmarshalHTTP(httpResp *http.Response) error
type GetXAttrsRequest ¶
type GetXAttrsRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` XAttrNames []string `validate:"required"` // Encode values after retrieving them. // Valid encodings are “text”, “hex”, and “base64”. // Values encoded as text strings are enclosed in double quotes ("), // and values encoded as hexadecimal and base64 are prefixed with 0x and 0s, respectively. // actually, encoding is not required, so nil is allowed. Encoding *XAttrValueEncoding //`validate:"required"` }
func (*GetXAttrsRequest) RawPath ¶
func (req *GetXAttrsRequest) RawPath() string
func (*GetXAttrsRequest) RawQuery ¶
func (req *GetXAttrsRequest) RawQuery() string
type GetXAttrsResponse ¶
type GetXAttrsResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` XAttrs `json:"XAttrs"` // XAttr array. }
func (*GetXAttrsResponse) UnmarshalHTTP ¶
func (resp *GetXAttrsResponse) UnmarshalHTTP(httpResp *http.Response) error
type HttpClient ¶
type HttpClient interface { Head(url string) (resp *http.Response, err error) Get(url string) (resp *http.Response, err error) Post(url, contentType string, body io.Reader) (resp *http.Response, err error) PostForm(url string, data url.Values) (resp *http.Response, err error) Do(req *http.Request) (*http.Response, error) }
func GetHttpClient ¶
type HttpRequest ¶ added in v0.0.9
type HttpRequest struct { // Close indicates whether to close the connection after // replying to this request (for servers) or after sending this // request and reading its response (for clients). // // some proxy does not support reuse connection, set Close true to disable it. Close bool PreSendHandler func(req *http.Request) (*http.Request, error) }
type HttpResponse ¶
type HttpResponse struct { // Indicates that a range of bytes was specified. AcceptRanges *string // Object data. // We guarantee that Body is always non-nil, even on responses without a body or responses with // a zero-length body. It is the caller's responsibility to close Body. Body io.ReadCloser // Specifies caching behavior along the request/reply chain. CacheControl *string // Specifies presentational information for the object. ContentDisposition *string // Specifies what content encodings have been applied to the object and thus // what decoding mechanisms must be applied to obtain the media-type referenced // by the Content-Type header field. ContentEncoding *string // The language the content is in. ContentLanguage *string // Size of the body in bytes. ContentLength *int64 // The portion of the object returned in the response. ContentRange *string // A standard MIME type describing the format of the object data. ContentType *string // An ETag is an opaque identifier assigned by a web server to a specific version // of a resource found at a URL. ETag *string // The date and time at which the object is no longer cacheable. Expires *string `location:"header" locationName:"Expires" type:"string"` // Last modified date of the object LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` }
func (*HttpResponse) UnmarshalHTTP ¶
func (resp *HttpResponse) UnmarshalHTTP(httpResp *http.Response)
type ListStatusBatchRequest ¶
type ListStatusBatchRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // The pathSuffix of the last item returned in the current batch. StartAfter *string }
func (*ListStatusBatchRequest) RawPath ¶
func (req *ListStatusBatchRequest) RawPath() string
func (*ListStatusBatchRequest) RawQuery ¶
func (req *ListStatusBatchRequest) RawQuery() string
type ListStatusBatchResponse ¶
type ListStatusBatchResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` DirectoryListing DirectoryListing `json:"directoryListing"` }
func (*ListStatusBatchResponse) UnmarshalHTTP ¶
func (resp *ListStatusBatchResponse) UnmarshalHTTP(httpResp *http.Response) error
type ListStatusRequest ¶
type ListStatusRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*ListStatusRequest) RawPath ¶
func (req *ListStatusRequest) RawPath() string
func (*ListStatusRequest) RawQuery ¶
func (req *ListStatusRequest) RawQuery() string
type ListStatusResponse ¶
type ListStatusResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` FileStatuses FileStatuses `json:"FileStatuses"` }
func (*ListStatusResponse) UnmarshalHTTP ¶
func (resp *ListStatusResponse) UnmarshalHTTP(httpResp *http.Response) error
type ListXAttrsRequest ¶
type ListXAttrsRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*ListXAttrsRequest) RawPath ¶
func (req *ListXAttrsRequest) RawPath() string
func (*ListXAttrsRequest) RawQuery ¶
func (req *ListXAttrsRequest) RawQuery() string
type ListXAttrsResponse ¶
type ListXAttrsResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` XAttrNames XAttrNames `json:"XAttrNames" validate:"required"` // XAttr names. }
func (*ListXAttrsResponse) UnmarshalHTTP ¶
func (resp *ListXAttrsResponse) UnmarshalHTTP(httpResp *http.Response) error
type Long ¶
type Long int64 // A long integer value
See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Long_JSON_Schema
type MkdirsRequest ¶
type MkdirsRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name permission // Description The permission of a file/directory. // Type Octal // Default Value 644 for files, 755 for directories // Valid Values 0 - 1777 // Syntax Any radix-8 integer (leading zeros may be omitted.) Permission *int }
func (*MkdirsRequest) RawPath ¶
func (req *MkdirsRequest) RawPath() string
func (*MkdirsRequest) RawQuery ¶
func (req *MkdirsRequest) RawQuery() string
type MkdirsResponse ¶
type MkdirsResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` Boolean Boolean `json:"boolean"` }
func (*MkdirsResponse) UnmarshalHTTP ¶
func (resp *MkdirsResponse) UnmarshalHTTP(httpResp *http.Response) error
type OpenRequest ¶
type OpenRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field // '/' will be ignored automatically Path *string `validate:"required"` // Name offset // Description The starting byte position. // Type long // Default Value 0 // Valid Values >= 0 // Syntax Any integer. Offset *int64 // Name length // Description The number of bytes to be processed. // Type long // Default Value null (means the entire file) // Valid Values >= 0 or null // Syntax Any integer. Length *int64 // Name buffersize // Description The size of the buffer used in transferring data. // Type int // Default Value Specified in the configuration. // Valid Values > 0 // Syntax Any integer. BufferSize *int32 // Name nodirect // Description Disable automatically redirected. // Type bool // Default Value false // Valid Values true|false // Syntax Any Bool. NoDirect *bool }
func (*OpenRequest) RawPath ¶
func (req *OpenRequest) RawPath() string
func (*OpenRequest) RawQuery ¶
func (req *OpenRequest) RawQuery() string
type OpenResponse ¶
type OpenResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` NoDirect bool `json:"-"` Location *string `json:"Location"` }
func (*OpenResponse) UnmarshalHTTP ¶
func (resp *OpenResponse) UnmarshalHTTP(httpResp *http.Response) error
type Path ¶
type Path string // The string representation a Path.
See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Path_JSON_Schema
type Permission ¶ added in v0.0.4
type Permission uint64
The permission of a file/directory. 644 for files, 755 for directories See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Permission
const ( DefaultPermissionFile Permission = 0644 DefaultPermissionDirectory Permission = 0755 )
func (Permission) MarshalJSON ¶ added in v0.0.4
func (p Permission) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for XAttrNamespace
func (Permission) New ¶ added in v0.0.8
func (p Permission) New() *Permission
func (Permission) String ¶ added in v0.0.4
func (p Permission) String() string
func (*Permission) UnmarshalJSON ¶ added in v0.0.4
func (p *Permission) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for XAttrNamespace
type ProxyUser ¶
type ProxyUser struct { // Name user.name // Description The authenticated user; see Authentication. // Type String // Default Value null // Valid Values Any valid username. // Syntax Any string. Username *string // Name doas // Description Allowing a proxy user to do as another user. // Type String // Default Value null // Valid Values Any valid username. // Syntax Any string. DoAs *string }
See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Proxy_Users
type Quota ¶
type Quota struct { Consumed int64 `json:"consumed" validate:"required"` // The storage type space consumed. Quota int64 `json:"quota" validate:"required"` // The storage type quota. }
See also: http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsQuotaAdminGuide.html for more information.
type QuotaUsage ¶
type QuotaUsage struct { FileAndDirectoryCount int64 `json:"fileAndDirectoryCount" validate:"required"` // The number of files and directories. Quota int64 `json:"quota" validate:"required"` // The namespace quota of this directory. SpaceConsumed int64 `json:"spaceConsumed" validate:"required"` // The disk space consumed by the content. SpaceQuota int64 `json:"spaceQuota" validate:"required"` // The disk space quota. TypeQuota TypeQuota `json:"typeQuota" validate:"required"` }
type RemoteException ¶
type RemoteException struct { Exception string `json:"exception" validate:"required"` // Name of the exception Message string `json:"message" validate:"required"` // Exception message JavaClassName string `json:"javaClassName,omitempty"` // Java class name of the exception }
func (*RemoteException) Error ¶
func (e *RemoteException) Error() string
Error returns the string representation of the error. Satisfies the error interface.
func (*RemoteException) Unwrap ¶
func (e *RemoteException) Unwrap() error
type RemoveXAttrRequest ¶
type RemoveXAttrRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name xattr.name // Description The XAttr name of a file/directory. // Type String // Default Value <empty> // Valid Values Any string prefixed with user./trusted./system./security.. // Syntax Any string prefixed with user./trusted./system./security.. XAttrName *string `validate:"required"` }
func (*RemoveXAttrRequest) RawPath ¶
func (req *RemoveXAttrRequest) RawPath() string
func (*RemoveXAttrRequest) RawQuery ¶
func (req *RemoveXAttrRequest) RawQuery() string
type RemoveXAttrResponse ¶
type RemoveXAttrResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*RemoveXAttrResponse) UnmarshalHTTP ¶
func (resp *RemoveXAttrResponse) UnmarshalHTTP(httpResp *http.Response) error
type RenameRequest ¶
type RenameRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name destination // Description The destination path. // Type Path // Default Value <empty> (an invalid path) // Valid Values An absolute FileSystem path without scheme and authority. // Syntax Any path. Destination *string `validate:"required"` }
func (*RenameRequest) RawPath ¶
func (req *RenameRequest) RawPath() string
func (*RenameRequest) RawQuery ¶
func (req *RenameRequest) RawQuery() string
type RenameResponse ¶
type RenameResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` Boolean Boolean `json:"boolean"` }
func (*RenameResponse) UnmarshalHTTP ¶
func (resp *RenameResponse) UnmarshalHTTP(httpResp *http.Response) error
type RenameSnapshotRequest ¶
type RenameSnapshotRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name oldsnapshotname // Description The old name of the snapshot to be renamed. // Type String // Default Value null // Valid Values An existing snapshot name. // Syntax Any string. // See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Old_Snapshot_Name Oldsnapshotname *string `json:"oldsnapshotname,omitempty" validate:"required"` // Name snapshotname // Description The name of the snapshot to be created/deleted. Or the new name for snapshot rename. // Type String // Default Value null // Valid Values Any valid snapshot name. // Syntax Any string. // See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Snapshot_Name Snapshotname *string `json:"snapshotname,omitempty"` }
func (*RenameSnapshotRequest) RawPath ¶
func (req *RenameSnapshotRequest) RawPath() string
func (*RenameSnapshotRequest) RawQuery ¶
func (req *RenameSnapshotRequest) RawQuery() string
type RenameSnapshotResponse ¶
type RenameSnapshotResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*RenameSnapshotResponse) UnmarshalHTTP ¶
func (resp *RenameSnapshotResponse) UnmarshalHTTP(httpResp *http.Response) error
type RenewDelegationTokenRequest ¶
type RenewDelegationTokenRequest struct { Authentication ProxyUser CSRF HttpRequest // Name token // Description The delegation token used for the operation. // Type String // Default Value <empty> // Valid Values An encoded token. // Syntax See the note in Delegation. Token *string `json:"token,omitempty"` }
func (*RenewDelegationTokenRequest) RawPath ¶
func (req *RenewDelegationTokenRequest) RawPath() string
func (*RenewDelegationTokenRequest) RawQuery ¶
func (req *RenewDelegationTokenRequest) RawQuery() string
type RenewDelegationTokenResponse ¶
type RenewDelegationTokenResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` //Long Long `json:"long"` Long time_.UnixTimeMillisecond `json:"long"` }
func (*RenewDelegationTokenResponse) UnmarshalHTTP ¶
func (resp *RenewDelegationTokenResponse) UnmarshalHTTP(httpResp *http.Response) error
type SatisfyStoragePolicyRequest ¶
type SatisfyStoragePolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name storagepolicy // Description The name of the storage policy. // Type String // Default Value <empty> // Valid Values Any valid storage policy name; see GETALLSTORAGEPOLICY. // Syntax Any string. StoragePolicy *string `validate:"required"` }
func (*SatisfyStoragePolicyRequest) RawPath ¶
func (req *SatisfyStoragePolicyRequest) RawPath() string
func (*SatisfyStoragePolicyRequest) RawQuery ¶
func (req *SatisfyStoragePolicyRequest) RawQuery() string
type SatisfyStoragePolicyResponse ¶
type SatisfyStoragePolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*SatisfyStoragePolicyResponse) UnmarshalHTTP ¶
func (resp *SatisfyStoragePolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type SetECPolicyRequest ¶
type SetECPolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name ecpolicy, Erasure Coding Policy // Description The name of the erasure coding policy. // Type String // Default Value <empty> // Valid Values Any valid erasure coding policy name; // Syntax Any string. ECPolicy *string `validate:"required"` }
func (*SetECPolicyRequest) RawPath ¶
func (req *SetECPolicyRequest) RawPath() string
func (*SetECPolicyRequest) RawQuery ¶
func (req *SetECPolicyRequest) RawQuery() string
type SetECPolicyResponse ¶
type SetECPolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*SetECPolicyResponse) UnmarshalHTTP ¶
func (resp *SetECPolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type SetOwnerRequest ¶
type SetOwnerRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name owner // Description The username who is the owner of a file/directory. // Type String // Default Value <empty> (means keeping it unchanged) // Valid Values Any valid username. // Syntax Any string. Owner *string // Name group // Description The name of a group. // Type String // Default Value <empty> (means keeping it unchanged) // Valid Values Any valid group name. // Syntax Any string. Group *string }
func (*SetOwnerRequest) RawPath ¶
func (req *SetOwnerRequest) RawPath() string
func (*SetOwnerRequest) RawQuery ¶
func (req *SetOwnerRequest) RawQuery() string
type SetOwnerResponse ¶
type SetOwnerResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*SetOwnerResponse) UnmarshalHTTP ¶
func (resp *SetOwnerResponse) UnmarshalHTTP(httpResp *http.Response) error
type SetPermissionRequest ¶
type SetPermissionRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name permission // Description The permission of a file/directory. // Type Octal // Default Value 644 for files, 755 for directories // Valid Values 0 - 1777 // Syntax Any radix-8 integer (leading zeros may be omitted.) Permission *Permission }
func (*SetPermissionRequest) RawPath ¶
func (req *SetPermissionRequest) RawPath() string
func (*SetPermissionRequest) RawQuery ¶
func (req *SetPermissionRequest) RawQuery() string
type SetPermissionResponse ¶
type SetPermissionResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*SetPermissionResponse) UnmarshalHTTP ¶
func (resp *SetPermissionResponse) UnmarshalHTTP(httpResp *http.Response) error
type SetReplicationRequest ¶
type SetReplicationRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name replication // Description The number of replications of a file. // Type short // Default Value Specified in the configuration. // Valid Values > 0 // Syntax Any integer. Replication *int `validate:"required"` }
func (*SetReplicationRequest) RawPath ¶
func (req *SetReplicationRequest) RawPath() string
func (*SetReplicationRequest) RawQuery ¶
func (req *SetReplicationRequest) RawQuery() string
type SetReplicationResponse ¶
type SetReplicationResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` Boolean Boolean `json:"boolean"` }
func (*SetReplicationResponse) UnmarshalHTTP ¶
func (resp *SetReplicationResponse) UnmarshalHTTP(httpResp *http.Response) error
type SetStoragePolicyRequest ¶
type SetStoragePolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name storagepolicy // Description The name of the storage policy. // Type String // Default Value <empty> // Valid Values Any valid storage policy name; see GETALLSTORAGEPOLICY. // Syntax Any string. StoragePolicy *string `validate:"required"` }
func (*SetStoragePolicyRequest) RawPath ¶
func (req *SetStoragePolicyRequest) RawPath() string
func (*SetStoragePolicyRequest) RawQuery ¶
func (req *SetStoragePolicyRequest) RawQuery() string
type SetStoragePolicyResponse ¶
type SetStoragePolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*SetStoragePolicyResponse) UnmarshalHTTP ¶
func (resp *SetStoragePolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type SetTimesRequest ¶
type SetTimesRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name modificationtime // Description The modification time of a file/directory. // Type long // Default Value -1 (means keeping it unchanged) // Valid Values -1 or a timestamp // Syntax Any integer. Modificationtime *time_.UnixTimeMillisecond // Name accesstime // Description The access time of a file/directory. // Type long // Default Value -1 (means keeping it unchanged) // Valid Values -1 or a timestamp // Syntax Any integer. Accesstime *time_.UnixTimeMillisecond }
func (*SetTimesRequest) RawPath ¶
func (req *SetTimesRequest) RawPath() string
func (*SetTimesRequest) RawQuery ¶
func (req *SetTimesRequest) RawQuery() string
type SetTimesResponse ¶
type SetTimesResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*SetTimesResponse) UnmarshalHTTP ¶
func (resp *SetTimesResponse) UnmarshalHTTP(httpResp *http.Response) error
type SetXAttrRequest ¶
type SetXAttrRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name xattr.name // Description The XAttr name of a file/directory. // Type String // Default Value <empty> // Valid Values Any string prefixed with user./trusted./system./security.. // Syntax Any string prefixed with user./trusted./system./security.. XAttrName *string `validate:"required"` // Name xattr.value // Description The XAttr value of a file/directory. // Type String // Default Value <empty> // Valid Values An encoded value. // Syntax Enclosed in double quotes or prefixed with 0x or 0s. XAttrValue *string `validate:"required"` // Name flag // Description The XAttr set flag. // Type String // Default Value <empty> // Valid Values CREATE,REPLACE. // Syntax CREATE,REPLACE. XAttrFlag *XAttrSetFlag `validate:"required"` }
func (*SetXAttrRequest) RawPath ¶
func (req *SetXAttrRequest) RawPath() string
func (*SetXAttrRequest) RawQuery ¶
func (req *SetXAttrRequest) RawQuery() string
type SetXAttrResponse ¶
type SetXAttrResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*SetXAttrResponse) UnmarshalHTTP ¶
func (resp *SetXAttrResponse) UnmarshalHTTP(httpResp *http.Response) error
type SnapshotDiffReport ¶
type SnapshotDiffReport struct { DiffList []DiffReportEntry `json:"diffList" validate:"required"` // An array of DiffReportEntry. FromSnapshot string `json:"fromSnapshot" validate:"required"` // Source snapshot. SnapshotRoot string `json:"snapshotRoot" validate:"required"` // String representation of snapshot root path. ToSnapshot string `json:"toSnapshot" validate:"required"` // Destination snapshot. }
type SnapshottableDirectoryList ¶
type SnapshottableDirectoryList = []SnapshottableDirectoryStatus // An array of SnapshottableDirectoryStatus
type SnapshottableDirectoryStatus ¶
type SnapshottableDirectoryStatus struct { DirStatus FileStatusProperties `json:"dirStatus"` // Source path name relative to snapshot root. ParentFullPath string `json:"parentFullPath" validate:"required"` // Full path of the parent of snapshottable directory. SnapshotNumber int64 `json:"snapshotNumber" validate:"required"` // Number of snapshots created on the snapshottable directory. SnapshotQuota int64 `json:"snapshotQuota" validate:"required"` // Total number of snapshots allowed on the snapshottable directory. }
type StorageType ¶
type StorageType string
const ( StorageTypeRamDisk StorageType = "RAM_DISK" StorageTypeSsd StorageType = "SSD" StorageTypeDisk StorageType = "DISK" StorageTypeArchive StorageType = "ARCHIVE" )
type Token ¶
type Token struct {
UrlString string `json:"urlString" validate:"required"` // A delegation token encoded as a URL safe string.
}
type TruncateRequest ¶
type TruncateRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` // Name newlength // Description The size the file is to be truncated to. // Type long // Valid Values >= 0 // Syntax Any long. NewLength *int64 `validate:"required"` }
func (*TruncateRequest) RawPath ¶
func (req *TruncateRequest) RawPath() string
func (*TruncateRequest) RawQuery ¶
func (req *TruncateRequest) RawQuery() string
type TruncateResponse ¶
type TruncateResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` // true: truncate to newlength // false: truncate to zero Boolean Boolean `json:"boolean"` }
func (*TruncateResponse) UnmarshalHTTP ¶
func (resp *TruncateResponse) UnmarshalHTTP(httpResp *http.Response) error
type UnsetECPolicyRequest ¶
type UnsetECPolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*UnsetECPolicyRequest) RawPath ¶
func (req *UnsetECPolicyRequest) RawPath() string
func (*UnsetECPolicyRequest) RawQuery ¶
func (req *UnsetECPolicyRequest) RawQuery() string
type UnsetECPolicyResponse ¶
type UnsetECPolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*UnsetECPolicyResponse) UnmarshalHTTP ¶
func (resp *UnsetECPolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type UnsetStoragePolicyRequest ¶
type UnsetStoragePolicyRequest struct { Authentication ProxyUser CSRF HttpRequest // Path of the object to get. // // Path is a required field Path *string `validate:"required"` }
func (*UnsetStoragePolicyRequest) RawPath ¶
func (req *UnsetStoragePolicyRequest) RawPath() string
func (*UnsetStoragePolicyRequest) RawQuery ¶
func (req *UnsetStoragePolicyRequest) RawQuery() string
type UnsetStoragePolicyResponse ¶
type UnsetStoragePolicyResponse struct { NameNode string `json:"-"` ErrorResponse HttpResponse `json:"-"` }
func (*UnsetStoragePolicyResponse) UnmarshalHTTP ¶
func (resp *UnsetStoragePolicyResponse) UnmarshalHTTP(httpResp *http.Response) error
type XAttrNames ¶
type XAttrNames []string
func (XAttrNames) MarshalJSON ¶ added in v0.0.8
func (name XAttrNames) MarshalJSON() ([]byte, error)
func (*XAttrNames) UnmarshalJSON ¶ added in v0.0.8
func (names *XAttrNames) UnmarshalJSON(data []byte) error
type XAttrNamespace ¶
type XAttrNamespace int
XAttr Name The XAttr name of a file/directory. Any string prefixed with user./trusted./system./security.. See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#XAttr_Name See also: https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/ExtendedAttributes.html
const ( // In HDFS, there are five valid namespaces: user, trusted, system, security, and raw. Each of these namespaces have different access restrictions. // The user namespace is the namespace that will commonly be used by client applications. // Access to extended attributes in the user namespace is controlled by the corresponding file permissions. XAttrNamespaceUser XAttrNamespace = iota // user // The trusted namespace is available only to HDFS superusers. XAttrNamespaceTrusted XAttrNamespace = iota // trusted // The system namespace is reserved for internal HDFS use. // This namespace is not accessible through userspace methods, and is reserved for implementing internal HDFS features. XAttrNamespaceSystem XAttrNamespace = iota // system // The security namespace is reserved for internal HDFS use. // This namespace is generally not accessible through userspace methods. // One particular use of security is the security.hdfs.unreadable.by.superuser extended attribute. // This xattr can only be set on files, and it will prevent the superuser from reading the file's contents. // The superuser can still read and modify file metadata, such as the owner, permissions, etc. // This xattr can be set and accessed by any user, assuming normal filesystem permissions. // This xattr is also write-once, and cannot be removed once set. // This xattr does not allow a value to be set. XAttrNamespaceSecurity XAttrNamespace = iota // security // The raw namespace is reserved for internal system attributes that sometimes need to be exposed. // Like system namespace attributes they are not visible to the user // except when getXAttr/getXAttrs is called on a file or directory in the /.reserved/raw HDFS directory hierarchy. // These attributes can only be accessed by the superuser. // An example of where raw namespace extended attributes are used is the distcp utility. // Encryption zone meta data is stored in raw.* extended attributes, // so as long as the administrator uses /.reserved/raw pathnames in source and target, // the encrypted files in the encryption zones are transparently copied. XAttrNamespaceRaw XAttrNamespace = iota // raw )
func ParseXAttrNamespaceString ¶
func ParseXAttrNamespaceString(s string) (XAttrNamespace, error)
ParseXAttrNamespaceString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func XAttrNamespaceValues ¶
func XAttrNamespaceValues() []XAttrNamespace
XAttrNamespaceValues returns all values of the enum
func (XAttrNamespace) MarshalBinary ¶
func (i XAttrNamespace) MarshalBinary() (data []byte, err error)
MarshalBinary implements the encoding.BinaryMarshaler interface for XAttrNamespace
func (XAttrNamespace) MarshalJSON ¶
func (i XAttrNamespace) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for XAttrNamespace
func (XAttrNamespace) MarshalText ¶
func (i XAttrNamespace) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for XAttrNamespace
func (XAttrNamespace) MarshalYAML ¶
func (i XAttrNamespace) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for XAttrNamespace
func (XAttrNamespace) New ¶
func (i XAttrNamespace) New() *XAttrNamespace
New returns a pointer to a new addr filled with the XAttrNamespace value passed in.
func (XAttrNamespace) Registered ¶
func (i XAttrNamespace) Registered() bool
IsAXAttrNamespace returns "true" if the value is listed in the enum definition. "false" otherwise
func (*XAttrNamespace) Scan ¶
func (i *XAttrNamespace) Scan(value interface{}) error
func (XAttrNamespace) String ¶
func (i XAttrNamespace) String() string
func (*XAttrNamespace) UnmarshalBinary ¶
func (i *XAttrNamespace) UnmarshalBinary(data []byte) error
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for XAttrNamespace
func (*XAttrNamespace) UnmarshalJSON ¶
func (i *XAttrNamespace) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for XAttrNamespace
func (*XAttrNamespace) UnmarshalText ¶
func (i *XAttrNamespace) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for XAttrNamespace
func (*XAttrNamespace) UnmarshalYAML ¶
func (i *XAttrNamespace) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for XAttrNamespace
type XAttrSetFlag ¶
type XAttrSetFlag string
XAttr set flag The XAttr set flag. See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#XAttr_set_flag
const ( XAttrSetFlagCreate XAttrSetFlag = "CREATE" XAttrSetFlagReplace XAttrSetFlag = "REPLACE" )
func (XAttrSetFlag) New ¶
func (f XAttrSetFlag) New() *XAttrSetFlag
type XAttrValueEncoding ¶
type XAttrValueEncoding string
The XAttr value encoding. See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#XAttr_value_encoding
const ( XAttrValueEncodingText XAttrValueEncoding = "text" XAttrValueEncodingHex XAttrValueEncoding = "hex" XAttrValueEncodingBase64 XAttrValueEncoding = "base64" )
func (XAttrValueEncoding) New ¶
func (f XAttrValueEncoding) New() *XAttrValueEncoding
Source Files ¶
- api.allow_snapshot.go
- api.append.go
- api.auth.go
- api.cancel_delegation_token.go
- api.check_access.go
- api.concat.go
- api.create.go
- api.create_snapshot.go
- api.create_symlink.go
- api.csrf.go
- api.delete.go
- api.delete_snapshot.go
- api.disable_ec_policy.go
- api.disallow_snapshot.go
- api.enable_ec_policy.go
- api.error.go
- api.get_all_storage_policy.go
- api.get_all_xattrs.go
- api.get_content_summary.go
- api.get_delegation_token.go
- api.get_ec_policy.go
- api.get_file_block_locations.go
- api.get_file_checksum.go
- api.get_file_status.go
- api.get_home_directory.go
- api.get_quota_usage.go
- api.get_snapshot_diff.go
- api.get_snapshottable_directory_list.go
- api.get_storage_policy.go
- api.get_trash_root.go
- api.get_xattr.go
- api.get_xattrs.go
- api.go
- api.http.go
- api.http_query_parameter_dictionary.go
- api.json_schema.go
- api.list_status.go
- api.list_status_batch.go
- api.list_xattrs.go
- api.mkdirs.go
- api.open.go
- api.proxy_users.go
- api.remove_xattr.go
- api.rename.go
- api.rename_snapshot.go
- api.renew_delegation_token.go
- api.satisfy_storage_policy.go
- api.set_ec_policy.go
- api.set_owner.go
- api.set_permission.go
- api.set_replication.go
- api.set_storage_policy.go
- api.set_times.go
- api.set_xattr.go
- api.truncate.go
- api.unset_ec_policy.go
- api.unset_storage_policy.go
- api.xattrnamespace_enum.go
- client.go
- client.options.go
- client_options.go
- config.go
- http.go