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)  

irods_resource_plugin_impostor.cpp
Go to the documentation of this file.
1 // =-=-=-=-=-=-=-
2 //
6 #include "irods_file_object.hpp"
12 #include "irods_stacktrace.hpp"
15 
16 #include "miscServerFunct.hpp"
17 
18 
21  return SUCCESS();
22 }
23 
26  return SUCCESS();
27 }
28 
31  return SUCCESS();
32 }
33 
36  const std::string* ) {
37  return SUCCESS();
38 }
39 
41  irods::plugin_context& _ctx ) {
43 } // impostor_file_getfs_freespace
44 
46  irods::plugin_context& _ctx ) {
48 } // impostor_file_create
49 
51  irods::plugin_context& _ctx ) {
53 } // impostor_file_open
54 
57  void*,
58  int ) {
60 } // impostor_file_read
61 
64  void*,
65  int ) {
67 } // impostor_file_write
68 
70  irods::plugin_context& _ctx ) {
72 } // impostor_file_close
73 
75  irods::plugin_context& _ctx ) {
77 } // impostor_file_unlink
78 
81  struct stat* ) {
83 } // impostor_file_stat
84 
87  long long ,
88  int ) {
90 } // impostor_file_lseek
91 
93  irods::plugin_context& _ctx ) {
95 } // impostor_file_mkdir
96 
98  irods::plugin_context& _ctx ) {
100 } // impostor_file_rmdir
101 
103  irods::plugin_context& _ctx ) {
105 } // impostor_file_opendir
106 
108  irods::plugin_context& _ctx ) {
110 } // impostor_file_closedir
111 
113  irods::plugin_context& _ctx,
114  struct rodsDirent** ) {
116 } // impostor_file_readdir
117 
119  irods::plugin_context& _ctx,
120  const char* ) {
122 } // impostor_file_rename
123 
125  irods::plugin_context& _ctx ) {
127 } // impostor_file_truncate
128 
130  irods::plugin_context& _ctx,
131  const char* ) {
133 } // impostor_file_stage_to_cache
134 
136  irods::plugin_context& _ctx,
137  const char* ) {
139 } // impostor_file_sync_to_arch
140 
141 // =-=-=-=-=-=-=-
142 // redirect_create - code to determine redirection for create operation
144  irods::plugin_property_map& _prop_map,
145  const std::string& _resc_name,
146  const std::string& _curr_host,
147  float& _out_vote ) {
148  irods::error result = SUCCESS();
149 
150  // =-=-=-=-=-=-=-
151  // determine if the resource is down
152  int resc_status = 0;
153  irods::error get_ret = _prop_map.get< int >( irods::RESOURCE_STATUS, resc_status );
154  if ( ( result = ASSERT_PASS( get_ret, "Failed to get \"status\" property." ) ).ok() ) {
155 
156  // =-=-=-=-=-=-=-
157  // if the status is down, vote no.
158  if ( INT_RESC_STATUS_DOWN == resc_status ) {
159  _out_vote = 0.0;
160  result.code( SYS_RESC_IS_DOWN );
161  // result = PASS( result );
162  }
163  else {
164 
165  // =-=-=-=-=-=-=-
166  // get the resource host for comparison to curr host
167  std::string host_name;
168  get_ret = _prop_map.get< std::string >( irods::RESOURCE_LOCATION, host_name );
169  if ( ( result = ASSERT_PASS( get_ret, "Failed to get \"location\" property." ) ).ok() ) {
170 
171  // =-=-=-=-=-=-=-
172  // vote higher if we are on the same host
173  if ( _curr_host == host_name ) {
174  _out_vote = 1.0;
175  }
176  else {
177  _out_vote = 0.5;
178  }
179  }
180 
181  rodsLog(
182  LOG_DEBUG,
183  "create :: resc name [%s] curr host [%s] resc host [%s] vote [%f]",
184  _resc_name.c_str(),
185  _curr_host.c_str(),
186  host_name.c_str(),
187  _out_vote );
188 
189  }
190  }
191  return result;
192 
193 } // impostor_file_resolve_hierarchy_create
194 
195 // =-=-=-=-=-=-=-
196 // resolve_hierarchy_open - code to determine redirection for open operation
198  irods::plugin_property_map& _prop_map,
199  irods::file_object_ptr _file_obj,
200  const std::string& _resc_name,
201  const std::string& _curr_host,
202  float& _out_vote ) {
203  irods::error result = SUCCESS();
204 
205  // =-=-=-=-=-=-=-
206  // initially set a good default
207  _out_vote = 0.0;
208 
209  // =-=-=-=-=-=-=-
210  // determine if the resource is down
211  int resc_status = 0;
212  irods::error get_ret = _prop_map.get< int >( irods::RESOURCE_STATUS, resc_status );
213  if ( ( result = ASSERT_PASS( get_ret, "Failed to get \"status\" property." ) ).ok() ) {
214 
215  // =-=-=-=-=-=-=-
216  // if the status is down, vote no.
217  if ( INT_RESC_STATUS_DOWN != resc_status ) {
218 
219  // =-=-=-=-=-=-=-
220  // get the resource host for comparison to curr host
221  std::string host_name;
222  get_ret = _prop_map.get< std::string >( irods::RESOURCE_LOCATION, host_name );
223  if ( ( result = ASSERT_PASS( get_ret, "Failed to get \"location\" property." ) ).ok() ) {
224 
225  // =-=-=-=-=-=-=-
226  // set a flag to test if were at the curr host, if so we vote higher
227  bool curr_host = ( _curr_host == host_name );
228 
229  // =-=-=-=-=-=-=-
230  // make some flags to clarify decision making
231  bool need_repl = ( _file_obj->repl_requested() > -1 );
232 
233  // =-=-=-=-=-=-=-
234  // set up variables for iteration
235  irods::error final_ret = SUCCESS();
236  std::vector< irods::physical_object > objs = _file_obj->replicas();
237  std::vector< irods::physical_object >::iterator itr = objs.begin();
238 
239  // =-=-=-=-=-=-=-
240  // check to see if the replica is in this resource, if one is requested
241  for ( ; itr != objs.end(); ++itr ) {
242  // =-=-=-=-=-=-=-
243  // run the hier string through the parser and get the last
244  // entry.
245  std::string last_resc;
247  parser.set_string( itr->resc_hier() );
248  parser.last_resc( last_resc );
249 
250  // =-=-=-=-=-=-=-
251  // more flags to simplify decision making
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 );
255 
256  // =-=-=-=-=-=-=-
257  // success - correct resource and don't need a specific
258  // replication, or the repl nums match
259  if ( resc_us ) {
260  // =-=-=-=-=-=-=-
261  // if a specific replica is requested then we
262  // ignore all other criteria
263  if ( need_repl ) {
264  if ( repl_us ) {
265  _out_vote = 1.0;
266  }
267  else {
268  // =-=-=-=-=-=-=-
269  // repl requested and we are not it, vote
270  // very low
271  _out_vote = 0.25;
272  }
273  }
274  else {
275  // =-=-=-=-=-=-=-
276  // if no repl is requested consider dirty flag
277  if ( is_dirty ) {
278  // =-=-=-=-=-=-=-
279  // repl is dirty, vote very low
280  _out_vote = 0.25;
281  }
282  else {
283  // =-=-=-=-=-=-=-
284  // if our repl is not dirty then a local copy
285  // wins, otherwise vote middle of the road
286  if ( curr_host ) {
287  _out_vote = 1.0;
288  }
289  else {
290  _out_vote = 0.5;
291  }
292  }
293  }
294 
295  rodsLog(
296  LOG_DEBUG,
297  "open :: resc name [%s] curr host [%s] resc host [%s] vote [%f]",
298  _resc_name.c_str(),
299  _curr_host.c_str(),
300  host_name.c_str(),
301  _out_vote );
302 
303  break;
304 
305  } // if resc_us
306 
307  } // for itr
308  }
309  }
310  else {
311  result.code( SYS_RESC_IS_DOWN );
312  result = PASS( result );
313  }
314  }
315 
316  return result;
317 
318 } // impostor_file_resolve_hierarchy_open
319 
320 // =-=-=-=-=-=-=-
321 // used to allow the resource to determine which host
322 // should provide the requested operation
324  irods::plugin_context& _ctx,
325  const std::string* _opr,
326  const std::string* _curr_host,
327  irods::hierarchy_parser* _out_parser,
328  float* _out_vote ) {
329  irods::error result = SUCCESS();
330 
331  // =-=-=-=-=-=-=-
332  // check the context validity
333  irods::error ret = _ctx.valid< irods::file_object >();
334  if ( ( result = ASSERT_PASS( ret, "Invalid resource context." ) ).ok() ) {
335 
336  // =-=-=-=-=-=-=-
337  // check incoming parameters
338  if ( ( result = ASSERT_ERROR( _opr && _curr_host && _out_parser && _out_vote, SYS_INVALID_INPUT_PARAM, "Invalid input parameter." ) ).ok() ) {
339  // =-=-=-=-=-=-=-
340  // cast down the chain to our understood object type
341  irods::file_object_ptr file_obj = boost::dynamic_pointer_cast< irods::file_object >( _ctx.fco() );
342 
343  // =-=-=-=-=-=-=-
344  // get the name of this resource
345  std::string resc_name;
346  ret = _ctx.prop_map().get< std::string >( irods::RESOURCE_NAME, resc_name );
347  if ( ( result = ASSERT_PASS( ret, "Failed in get property for name." ) ).ok() ) {
348  // =-=-=-=-=-=-=-
349  // add ourselves to the hierarchy parser by default
350  _out_parser->add_child( resc_name );
351 
352  // =-=-=-=-=-=-=-
353  // test the operation to determine which choices to make
354  if ( irods::OPEN_OPERATION == ( *_opr ) ||
355  irods::WRITE_OPERATION == ( *_opr ) ) {
356  // =-=-=-=-=-=-=-
357  // call redirect determination for 'get' operation
358  ret = impostor_file_resolve_hierarchy_open( _ctx.prop_map(), file_obj, resc_name, ( *_curr_host ), ( *_out_vote ) );
359  result = ASSERT_PASS( ret, "Failed redirecting for open." );
360 
361  }
362  else if ( irods::CREATE_OPERATION == ( *_opr ) ) {
363  // =-=-=-=-=-=-=-
364  // call redirect determination for 'create' operation
365  ret = impostor_file_resolve_hierarchy_create( _ctx.prop_map(), resc_name, ( *_curr_host ), ( *_out_vote ) );
366  result = ASSERT_PASS( ret, "Failed redirecting for create." );
367  }
368 
369  else {
370  // =-=-=-=-=-=-=-
371  // must have been passed a bad operation
372  result = ASSERT_ERROR( false, INVALID_OPERATION, "Operation not supported." );
373  }
374  }
375  }
376  }
377 
378  return result;
379 
380 } // impostor_file_resolve_hierarchy
381 
383  irods::plugin_context& _ctx ) {
384  return SUCCESS();
385 } // impostor_file_rebalance_plugin
386 
387 namespace irods {
388 
390  const std::string& _inst_name,
391  const std::string& _context ) :
392  resource(
393  _inst_name,
394  _context ) {
395  using namespace irods;
396  using namespace std;
399  function<error(plugin_context&)>(
401 
404  function<error(plugin_context&)>(
405  impostor_file_open ) );
406 
407  add_operation<void*,int>(
409  std::function<
410  error(irods::plugin_context&,void*,int)>(
411  impostor_file_read ) );
412 
413  add_operation<void*,int>(
415  function<error(plugin_context&,void*,int)>(
417 
420  function<error(plugin_context&)>(
422 
425  function<error(plugin_context&)>(
427 
428  add_operation<struct stat*>(
430  function<error(plugin_context&, struct stat*)>(
431  impostor_file_stat ) );
432 
435  function<error(plugin_context&)>(
437 
440  function<error(plugin_context&)>(
442 
443  add_operation<struct rodsDirent**>(
445  function<error(plugin_context&,struct rodsDirent**)>(
447 
448  add_operation<const char*>(
450  function<error(plugin_context&, const char*)>(
452 
455  function<error(plugin_context&)>(
457 
458  add_operation<long long, int>(
460  function<error(plugin_context&, long long, int)>(
462 
465  function<error(plugin_context&)>(
467 
470  function<error(plugin_context&)>(
472 
473  add_operation<const char*>(
475  function<error(plugin_context&, const char*)>(
477 
478  add_operation<const char*>(
480  function<error(plugin_context&, const char*)>(
482 
485  function<error(plugin_context&)>(
487 
490  function<error(plugin_context&)>(
492 
495  function<error(plugin_context&)>(
497 
498  add_operation<const std::string*>(
500  function<error(plugin_context&, const std::string*)>(
502 
505  function<error(plugin_context&)>(
507 
508  add_operation<const std::string*, const std::string*, irods::hierarchy_parser*, float*>(
510  function<error(plugin_context&,const std::string*, const std::string*, irods::hierarchy_parser*, float*)>(
512 
515  function<error(plugin_context&)>(
517 
518  // =-=-=-=-=-=-=-
519  // set some properties necessary for backporting to iRODS legacy code
520  set_property< int >( RESOURCE_CHECK_PATH_PERM, 2 );//DO_CHK_PATH_PERM );
521  set_property< int >( RESOURCE_CREATE_PATH, 1 );//CREATE_PATH );
522 
523  } // ctor
524 
526  _b = false;
527  return SUCCESS();
528  }
529 
531  return ERROR( -1, "nop" );
532  }
533 
535  plugin_context& _ctx ) {
536  std::string resc_name;
537  error ret = _ctx.prop_map().get< std::string >( RESOURCE_NAME, resc_name );
538  if ( !ret.ok() ) {
539  return PASS( ret );
540  }
541 
542  std::string resc_type;
543  ret = _ctx.prop_map().get< std::string >( RESOURCE_TYPE, resc_type );
544  if ( !ret.ok() ) {
545  return PASS( ret );
546  }
547 
548  std::string msg( "NOTE :: Direct Access of Impostor Resource [" );
549  msg += resc_name + "] of Given Type [" + resc_type + "]";
550 
551  addRErrorMsg( &_ctx.comm()->rError, STDOUT_STATUS, msg.c_str() );
552 
553  return ERROR(
555  msg );
556 
557  }
558 
559 
560 }; // namespace irods
561 
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
impostor_file_notify
irods::error impostor_file_notify(irods::plugin_context &, const std::string *)
Definition: irods_resource_plugin_impostor.cpp:34
irods_physical_object.hpp
irods::RESOURCE_LOCATION
const std::string RESOURCE_LOCATION("resource_property_location")
irods::lookup_table< boost::any >
impostor_file_close
irods::error impostor_file_close(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:69
irods::RESOURCE_NAME
const std::string RESOURCE_NAME("resource_property_name")
irods_server_properties.hpp
irods::RESOURCE_OP_STAT
const std::string RESOURCE_OP_STAT("resource_stat")
impostor_file_modified
irods::error impostor_file_modified(irods::plugin_context &)
Definition: irods_resource_plugin_impostor.cpp:29
impostor_file_closedir
irods::error impostor_file_closedir(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:107
impostor_file_create
irods::error impostor_file_create(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:45
irods::plugin_context::valid
virtual error valid()
Definition: irods_plugin_context.hpp:77
irods::resource
Definition: irods_resource_plugin.hpp:25
irods::RESOURCE_CHECK_PATH_PERM
const std::string RESOURCE_CHECK_PATH_PERM("resource_property_check_path_perm")
impostor_file_open
irods::error impostor_file_open(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:50
irods::RESOURCE_OP_MODIFIED
const std::string RESOURCE_OP_MODIFIED("resource_modified")
irods_file_object.hpp
irods::RESOURCE_OP_CLOSEDIR
const std::string RESOURCE_OP_CLOSEDIR("resource_closedir")
irods_stacktrace.hpp
irods::pdmo_type
std::function< irods::error(rcComm_t *) > pdmo_type
Definition: irods_plugin_base.hpp:29
PASS
#define PASS(prev_error_)
Definition: irods_error.hpp:118
irods_collection_object.hpp
irods::RESOURCE_OP_RESOLVE_RESC_HIER
const std::string RESOURCE_OP_RESOLVE_RESC_HIER("resource_resolve_hierarchy")
irods::impostor_resource::report_error
static error report_error(plugin_context &)
Definition: irods_resource_plugin_impostor.cpp:534
irods::RESOURCE_OP_READDIR
const std::string RESOURCE_OP_READDIR("resource_readdir")
irods::hierarchy_parser
Definition: irods_hierarchy_parser.hpp:14
irods::RESOURCE_OP_READ
const std::string RESOURCE_OP_READ("resource_read")
impostor_file_rmdir
irods::error impostor_file_rmdir(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:97
impostor_file_stage_to_cache
irods::error impostor_file_stage_to_cache(irods::plugin_context &_ctx, const char *)
Definition: irods_resource_plugin_impostor.cpp:129
irods::RESOURCE_OP_FREESPACE
const std::string RESOURCE_OP_FREESPACE("resource_freespace")
impostor_file_read
irods::error impostor_file_read(irods::plugin_context &_ctx, void *, int)
Definition: irods_resource_plugin_impostor.cpp:55
irods::RESOURCE_OP_LSEEK
const std::string RESOURCE_OP_LSEEK("resource_lseek")
deploy_schemas_locally.parser
parser
Definition: deploy_schemas_locally.py:59
impostor_file_opendir
irods::error impostor_file_opendir(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:102
irods::plugin_context
Definition: irods_plugin_context.hpp:18
irods::lookup_table::get
error get(const std::string &_key, ValueType &_val)
Definition: irods_lookup_table.hpp:71
irods_resource_redirect.hpp
irods::RESOURCE_STATUS
const std::string RESOURCE_STATUS("resource_property_status")
SYS_INVALID_INPUT_PARAM
@ SYS_INVALID_INPUT_PARAM
Definition: rodsErrorTable.h:195
ASSERT_ERROR
#define ASSERT_ERROR(expr_, code_, format_,...)
Definition: irods_error.hpp:123
impostor_file_mkdir
irods::error impostor_file_mkdir(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:92
irods_resource_plugin.hpp
impostor_file_resolve_hierarchy_open
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)
Definition: irods_resource_plugin_impostor.cpp:197
impostor_file_truncate
irods::error impostor_file_truncate(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:124
SUCCESS
#define SUCCESS()
Definition: irods_error.hpp:121
INVALID_OPERATION
@ INVALID_OPERATION
Definition: rodsErrorTable.h:760
irods::plugin_context::comm
virtual rsComm_t * comm()
Definition: irods_plugin_context.hpp:95
irods::RESOURCE_OP_TRUNCATE
const std::string RESOURCE_OP_TRUNCATE("resource_truncate")
irods_string_tokenize.hpp
irods::RESOURCE_OP_RENAME
const std::string RESOURCE_OP_RENAME("resource_rename")
impostor_file_unregistered
irods::error impostor_file_unregistered(irods::plugin_context &)
Definition: irods_resource_plugin_impostor.cpp:24
impostor_file_sync_to_arch
irods::error impostor_file_sync_to_arch(irods::plugin_context &_ctx, const char *)
Definition: irods_resource_plugin_impostor.cpp:135
irods::OPEN_OPERATION
const std::string OPEN_OPERATION("OPEN")
rsComm_t::rError
rError_t rError
Definition: rcConnect.h:158
irods::error::code
long long code() const
Definition: irods_error.cpp:194
irods::plugin_context::prop_map
virtual irods::plugin_property_map & prop_map()
Definition: irods_plugin_context.hpp:99
impostor_file_getfs_freespace
irods::error impostor_file_getfs_freespace(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:40
LOG_DEBUG
#define LOG_DEBUG
Definition: rodsLog.h:23
irods::hierarchy_parser::add_child
error add_child(const std::string &_resc)
Definition: irods_hierarchy_parser.cpp:88
irods::RESOURCE_OP_CREATE
const std::string RESOURCE_OP_CREATE("resource_create")
irods
Definition: apiHandler.hpp:35
irods::RESOURCE_TYPE
const std::string RESOURCE_TYPE("resource_property_type")
irods::impostor_resource::need_post_disconnect_maintenance_operation
error need_post_disconnect_maintenance_operation(bool &_b)
Definition: irods_resource_plugin_impostor.cpp:525
irods::RESOURCE_OP_NOTIFY
const std::string RESOURCE_OP_NOTIFY("resource_notify")
irods::RESOURCE_CREATE_PATH
const std::string RESOURCE_CREATE_PATH("resource_property_create_path")
irods::RESOURCE_OP_WRITE
const std::string RESOURCE_OP_WRITE("resource_write")
impostor_file_rebalance
irods::error impostor_file_rebalance(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:382
ASSERT_PASS
#define ASSERT_PASS(prev_error_, format_,...)
Definition: irods_error.hpp:124
addRErrorMsg
int addRErrorMsg(rError_t *myError, int status, const char *msg)
Definition: rcMisc.cpp:121
STDOUT_STATUS
static const int STDOUT_STATUS
Definition: rcMisc.h:327
irods::RESOURCE_OP_CLOSE
const std::string RESOURCE_OP_CLOSE("resource_close")
impostor_file_registered
irods::error impostor_file_registered(irods::plugin_context &)
Definition: irods_resource_plugin_impostor.cpp:19
rodsDirent
Definition: rodsType.h:70
impostor_file_readdir
irods::error impostor_file_readdir(irods::plugin_context &_ctx, struct rodsDirent **)
Definition: irods_resource_plugin_impostor.cpp:112
irods::RESOURCE_OP_UNLINK
const std::string RESOURCE_OP_UNLINK("resource_unlink")
irods::RESOURCE_OP_RMDIR
const std::string RESOURCE_OP_RMDIR("resource_rmdir")
ERROR
#define ERROR(code_, message_)
Definition: irods_error.hpp:117
impostor_file_unlink
irods::error impostor_file_unlink(irods::plugin_context &_ctx)
Definition: irods_resource_plugin_impostor.cpp:74
irods::RESOURCE_OP_UNREGISTERED
const std::string RESOURCE_OP_UNREGISTERED("resource_unregistered")
irods::error
Definition: irods_error.hpp:23
miscServerFunct.hpp
INT_RESC_STATUS_DOWN
#define INT_RESC_STATUS_DOWN
Definition: rodsDef.h:282
SYS_RESC_IS_DOWN
@ SYS_RESC_IS_DOWN
Definition: rodsErrorTable.h:170
INVALID_ACCESS_TO_IMPOSTOR_RESOURCE
@ INVALID_ACCESS_TO_IMPOSTOR_RESOURCE
Definition: rodsErrorTable.h:767
irods::RESOURCE_OP_REGISTERED
const std::string RESOURCE_OP_REGISTERED("resource_registered")
irods_hierarchy_parser.hpp
impostor_file_write
irods::error impostor_file_write(irods::plugin_context &_ctx, void *, int)
Definition: irods_resource_plugin_impostor.cpp:62
irods::file_object
Definition: irods_file_object.hpp:19
irods::RESOURCE_OP_MKDIR
const std::string RESOURCE_OP_MKDIR("resource_mkdir")
irods::RESOURCE_OP_OPENDIR
const std::string RESOURCE_OP_OPENDIR("resource_opendir")
irods::RESOURCE_OP_STAGETOCACHE
const std::string RESOURCE_OP_STAGETOCACHE("resource_stagetocache")
irods::impostor_resource::impostor_resource
impostor_resource(const std::string &_inst_name, const std::string &_context)
Definition: irods_resource_plugin_impostor.cpp:389
error
int error
Definition: filesystem.cpp:101
irods::file_object_ptr
boost::shared_ptr< file_object > file_object_ptr
Definition: irods_file_object.hpp:145
irods::WRITE_OPERATION
const std::string WRITE_OPERATION("WRITE")
irods::plugin_base::add_operation
error add_operation(const std::string &_op, std::function< error(plugin_context &)> _f)
Definition: irods_plugin_base.hpp:122
impostor_file_stat
irods::error impostor_file_stat(irods::plugin_context &_ctx, struct stat *)
Definition: irods_resource_plugin_impostor.cpp:79
irods::plugin_context::fco
virtual first_class_object_ptr fco()
Definition: irods_plugin_context.hpp:102
irods::RESOURCE_OP_SYNCTOARCH
const std::string RESOURCE_OP_SYNCTOARCH("resource_synctoarch")
impostor_file_lseek
irods::error impostor_file_lseek(irods::plugin_context &_ctx, long long, int)
Definition: irods_resource_plugin_impostor.cpp:85
irods::RESOURCE_OP_REBALANCE
const std::string RESOURCE_OP_REBALANCE("resource_rebalance")
irods_resource_plugin_impostor.hpp
irods::error::ok
bool ok()
Definition: irods_error.cpp:258
irods::RESOURCE_OP_OPEN
const std::string RESOURCE_OP_OPEN("resource_open")
irods::impostor_resource::post_disconnect_maintenance_operation
error post_disconnect_maintenance_operation(pdmo_type &_op)
Definition: irods_resource_plugin_impostor.cpp:530
irods::CREATE_OPERATION
const std::string CREATE_OPERATION("CREATE")
impostor_file_resolve_hierarchy
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)
Definition: irods_resource_plugin_impostor.cpp:323
impostor_file_rename
irods::error impostor_file_rename(irods::plugin_context &_ctx, const char *)
Definition: irods_resource_plugin_impostor.cpp:118
impostor_file_resolve_hierarchy_create
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)
Definition: irods_resource_plugin_impostor.cpp:143