file offload
Initiates offload of a file using a MAST Gateway.
Permissions Required
The user running the command must have (mode bit or Access Control Expression (ACE)) permissions to write to the file.
Syntax
- CLI
/opt/mapr/bin/maprcli file offload -name <file_name>
- REST
Request Type POST Request URL http[s]://<host:port>/rest/file/offload?<parameters>
Parameters
Parameter | Description |
---|---|
name |
The name (including the path) of the file to offload. |
Error Message
The OP_TIMEOUT message that indicates that the operation timed out, is returned if the connection to the gateway is lost.
Example
Offload file named test1
in volume named vol1
:
- CLI
/opt/mapr/bin/maprcli file offload -name /vol1/test1 { "timestamp":1520277246831, "timeofday":"2018-03-05 07:14:06.831 GMT+0000", "status":"OK", "total":1, "data":[ { "status":12, "message":"File transfer request queued.", "gateway":"10.10.88.200:8660", "jobid":"0x37d7c7738cd0991f.0xe35d5f0e5b24cda.0x4" } ] }
- REST
curl -X POST 'https://server.sj.us:8443/rest/file/offload?name=/vol1/test1' --user <username>:<password> {"timestamp":1520277246831,"timeofday":"2018-03-05 07:14:06.831 GMT+0000","status":"OK","total":1, "data":[{"status":12,"message":"File transfer request queued.","gateway":"10.10.88.200:8660", "jobid":"0x37d7c7738cd0991f.0xe35d5f0e5b24cda.0x4"}]}
Offload a file named mfs
in volume named vol1
:
- CLI
/opt/mapr/bin/maprcli file offload -name /vol1/mfs -json { "timestamp":1534141379576, "timeofday":"2018-08-12 11:22:59.576 GMT-0700 PM", "status":"ERROR", "errors":[ { "id":6, "desc":"Lost connection to gateway." } ] }
- REST
curl -X GET 'https://server.sj.us:8443/rest/file/tierjobstatus?name=/vol1/mfs' --user <username>:<password> {"timestamp":1534141379576,"timeofday":"2018-08-12 11:22:59.576 GMT-0700 PM","status":"ERROR", "errors":[{"id":6,"desc":"Lost connection to gateway."}]}