irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems. Fossies Dox: irods-4.2.8.tar.gz ("unofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file.
36 const std::string* ) {
145 const std::string& _resc_name,
146 const std::string& _curr_host,
154 if ( ( result =
ASSERT_PASS( get_ret,
"Failed to get \"status\" property." ) ).ok() ) {
167 std::string host_name;
169 if ( ( result =
ASSERT_PASS( get_ret,
"Failed to get \"location\" property." ) ).ok() ) {
173 if ( _curr_host == host_name ) {
183 "create :: resc name [%s] curr host [%s] resc host [%s] vote [%f]",
200 const std::string& _resc_name,
201 const std::string& _curr_host,
213 if ( ( result =
ASSERT_PASS( get_ret,
"Failed to get \"status\" property." ) ).ok() ) {
221 std::string host_name;
223 if ( ( result =
ASSERT_PASS( get_ret,
"Failed to get \"location\" property." ) ).ok() ) {
227 bool curr_host = ( _curr_host == host_name );
231 bool need_repl = ( _file_obj->repl_requested() > -1 );
236 std::vector< irods::physical_object > objs = _file_obj->replicas();
237 std::vector< irods::physical_object >::iterator itr = objs.begin();
241 for ( ; itr != objs.end(); ++itr ) {
245 std::string last_resc;
247 parser.set_string( itr->resc_hier() );
248 parser.last_resc( last_resc );
252 bool repl_us = ( _file_obj->repl_requested() == itr->repl_num() );
253 bool resc_us = ( _resc_name == last_resc );
254 bool is_dirty = ( itr->is_dirty() != 1 );
297 "open :: resc name [%s] curr host [%s] resc host [%s] vote [%f]",
312 result =
PASS( result );
325 const std::string* _opr,
326 const std::string* _curr_host,
334 if ( ( result =
ASSERT_PASS( ret,
"Invalid resource context." ) ).ok() ) {
345 std::string resc_name;
347 if ( ( result =
ASSERT_PASS( ret,
"Failed in get property for name." ) ).ok() ) {
359 result =
ASSERT_PASS( ret,
"Failed redirecting for open." );
366 result =
ASSERT_PASS( ret,
"Failed redirecting for create." );
390 const std::string& _inst_name,
391 const std::string& _context ) :
395 using namespace irods;
407 add_operation<void*,int>(
413 add_operation<void*,int>(
428 add_operation<struct stat*>(
443 add_operation<struct rodsDirent**>(
448 add_operation<const char*>(
458 add_operation<long long, int>(
473 add_operation<const char*>(
478 add_operation<const char*>(
498 add_operation<const std::string*>(
508 add_operation<const std::string*, const std::string*, irods::hierarchy_parser*, float*>(
531 return ERROR( -1,
"nop" );
536 std::string resc_name;
542 std::string resc_type;
548 std::string msg(
"NOTE :: Direct Access of Impostor Resource [" );
549 msg += resc_name +
"] of Given Type [" + resc_type +
"]";
void rodsLog(int level, const char *formatStr,...)
irods::error impostor_file_notify(irods::plugin_context &, const std::string *)
const std::string RESOURCE_LOCATION("resource_property_location")
irods::error impostor_file_close(irods::plugin_context &_ctx)
const std::string RESOURCE_NAME("resource_property_name")
const std::string RESOURCE_OP_STAT("resource_stat")
irods::error impostor_file_modified(irods::plugin_context &)
irods::error impostor_file_closedir(irods::plugin_context &_ctx)
irods::error impostor_file_create(irods::plugin_context &_ctx)
const std::string RESOURCE_CHECK_PATH_PERM("resource_property_check_path_perm")
irods::error impostor_file_open(irods::plugin_context &_ctx)
const std::string RESOURCE_OP_MODIFIED("resource_modified")
const std::string RESOURCE_OP_CLOSEDIR("resource_closedir")
std::function< irods::error(rcComm_t *) > pdmo_type
#define PASS(prev_error_)
const std::string RESOURCE_OP_RESOLVE_RESC_HIER("resource_resolve_hierarchy")
static error report_error(plugin_context &)
const std::string RESOURCE_OP_READDIR("resource_readdir")
const std::string RESOURCE_OP_READ("resource_read")
irods::error impostor_file_rmdir(irods::plugin_context &_ctx)
irods::error impostor_file_stage_to_cache(irods::plugin_context &_ctx, const char *)
const std::string RESOURCE_OP_FREESPACE("resource_freespace")
irods::error impostor_file_read(irods::plugin_context &_ctx, void *, int)
const std::string RESOURCE_OP_LSEEK("resource_lseek")
irods::error impostor_file_opendir(irods::plugin_context &_ctx)
error get(const std::string &_key, ValueType &_val)
const std::string RESOURCE_STATUS("resource_property_status")
@ SYS_INVALID_INPUT_PARAM
#define ASSERT_ERROR(expr_, code_, format_,...)
irods::error impostor_file_mkdir(irods::plugin_context &_ctx)
irods::error impostor_file_resolve_hierarchy_open(irods::plugin_property_map &_prop_map, irods::file_object_ptr _file_obj, const std::string &_resc_name, const std::string &_curr_host, float &_out_vote)
irods::error impostor_file_truncate(irods::plugin_context &_ctx)
virtual rsComm_t * comm()
const std::string RESOURCE_OP_TRUNCATE("resource_truncate")
const std::string RESOURCE_OP_RENAME("resource_rename")
irods::error impostor_file_unregistered(irods::plugin_context &)
irods::error impostor_file_sync_to_arch(irods::plugin_context &_ctx, const char *)
const std::string OPEN_OPERATION("OPEN")
virtual irods::plugin_property_map & prop_map()
irods::error impostor_file_getfs_freespace(irods::plugin_context &_ctx)
error add_child(const std::string &_resc)
const std::string RESOURCE_OP_CREATE("resource_create")
const std::string RESOURCE_TYPE("resource_property_type")
error need_post_disconnect_maintenance_operation(bool &_b)
const std::string RESOURCE_OP_NOTIFY("resource_notify")
const std::string RESOURCE_CREATE_PATH("resource_property_create_path")
const std::string RESOURCE_OP_WRITE("resource_write")
irods::error impostor_file_rebalance(irods::plugin_context &_ctx)
#define ASSERT_PASS(prev_error_, format_,...)
int addRErrorMsg(rError_t *myError, int status, const char *msg)
static const int STDOUT_STATUS
const std::string RESOURCE_OP_CLOSE("resource_close")
irods::error impostor_file_registered(irods::plugin_context &)
irods::error impostor_file_readdir(irods::plugin_context &_ctx, struct rodsDirent **)
const std::string RESOURCE_OP_UNLINK("resource_unlink")
const std::string RESOURCE_OP_RMDIR("resource_rmdir")
#define ERROR(code_, message_)
irods::error impostor_file_unlink(irods::plugin_context &_ctx)
const std::string RESOURCE_OP_UNREGISTERED("resource_unregistered")
#define INT_RESC_STATUS_DOWN
@ INVALID_ACCESS_TO_IMPOSTOR_RESOURCE
const std::string RESOURCE_OP_REGISTERED("resource_registered")
irods::error impostor_file_write(irods::plugin_context &_ctx, void *, int)
const std::string RESOURCE_OP_MKDIR("resource_mkdir")
const std::string RESOURCE_OP_OPENDIR("resource_opendir")
const std::string RESOURCE_OP_STAGETOCACHE("resource_stagetocache")
impostor_resource(const std::string &_inst_name, const std::string &_context)
boost::shared_ptr< file_object > file_object_ptr
const std::string WRITE_OPERATION("WRITE")
error add_operation(const std::string &_op, std::function< error(plugin_context &)> _f)
irods::error impostor_file_stat(irods::plugin_context &_ctx, struct stat *)
virtual first_class_object_ptr fco()
const std::string RESOURCE_OP_SYNCTOARCH("resource_synctoarch")
irods::error impostor_file_lseek(irods::plugin_context &_ctx, long long, int)
const std::string RESOURCE_OP_REBALANCE("resource_rebalance")
const std::string RESOURCE_OP_OPEN("resource_open")
error post_disconnect_maintenance_operation(pdmo_type &_op)
const std::string CREATE_OPERATION("CREATE")
irods::error impostor_file_resolve_hierarchy(irods::plugin_context &_ctx, const std::string *_opr, const std::string *_curr_host, irods::hierarchy_parser *_out_parser, float *_out_vote)
irods::error impostor_file_rename(irods::plugin_context &_ctx, const char *)
irods::error impostor_file_resolve_hierarchy_create(irods::plugin_property_map &_prop_map, const std::string &_resc_name, const std::string &_curr_host, float &_out_vote)