HSM Database
[Client]

Collaboration diagram for HSM Database:


Classes

struct  hdb_file2hdbID_t
struct  hdb_DirNode_t
 structure hdb_DirNode_t is used for store HSM active directories. More...
struct  hdb_NameOwner_t
struct  hdb_Active_t
struct  hdbWIN_Active_t
struct  hdbWIN_ReleaseCand_t
struct  hdbLNX_ReleaseCand_t
struct  hdb_ReleaseCand_t
struct  hdb_DirTree_t
class  hdb_Tables

Typedefs

typedef vector< hsm_FileHeader * > hsm_FileHeader_p_v_t
typedef
hsm_FileHeader_p_v_t::iterator 
hsm_FileHeader_p_v_i
typedef
hsm_FileHeader_p_v_t::size_type 
hsm_FileHeader_p_v_st
typedef fio_String
<&g_DirEntName_p
hdb_String
typedef vector< hdb_DirTree_thdb_DirTreeVec_t

Enumerations

enum  hdb_circList_e {
  clNoList, clMigration,
  clRecall, clSmall
}

Functions

cmn_Path IVD_HSMDB_DECL_d hsmdbGetPath (hdb_DirNode_t &a_dir)
cmn_Path IVD_HSMDB_DECL_d hsmdbGetPath (hdb_DirNode_t &a_dir, hdb_DirTreeVec_t &dirNode_v)
void IVD_HSMDB_DECL_d hdbReadNameOwnRec (ivd_RecordIDX_t a_nameOwnIdx, ivd_RecordIDX_t &a_dirTreeIdx, hdb_String &a_name, hdb_DirNode_t &a_ownerRec)
 get name, owner inode and oner nameOwnIdx from DB by using nameOwnIdx.
void IVD_HSMDB_DECL_d hdb_RemoveName (ivd_RecordIDX_t a_nameOwnIdx, fio_Transaction &a_trans)

Variables

IVD_HSMDB_DECL_d fio_VarLenRFTg_DirEntName_p
 global pointers to relative files
IVD_HSMDB_DECL_d fio_RelFileTransg_DirTree_p
IVD_HSMDB_DECL_d fio_RelFileTransg_NameOwner_p
IVD_HSMDB_DECL_d fio_RelFileTransg_File2hdbID_p
IVD_HSMDB_DECL_d fio_CirFileTransg_Active_p
IVD_HSMDB_DECL_d fio_CirFileTransg_RelCandRecal_p
IVD_HSMDB_DECL_d fio_CirFileTransg_RelCandMigrt_p
IVD_HSMDB_DECL_d fio_CirFileTransg_RelCandSmall_p
IVD_HSMDB_DECL_d fio_DataBaseg_hsmDB_p


Typedef Documentation

Definition at line 71 of file hdb_Tables.h.

Definition at line 67 of file hdb_Tables.h.

typedef hsm_FileHeader_p_v_t::iterator hsm_FileHeader_p_v_i

Definition at line 32 of file hdb_common.h.

typedef hsm_FileHeader_p_v_t::size_type hsm_FileHeader_p_v_st

Definition at line 33 of file hdb_common.h.

Definition at line 29 of file hdb_common.h.


Enumeration Type Documentation

Enumerator:
clNoList 
clMigration 
clRecall 
clSmall 

Definition at line 38 of file hdb_common.h.

00038                      {
00039     clNoList,
00040     clMigration,
00041     clRecall,
00042     clSmall
00043 };


Function Documentation

void IVD_HSMDB_DECL_d hdb_RemoveName ( ivd_RecordIDX_t  a_nameOwnIdx,
fio_Transaction a_trans 
)

Definition at line 364 of file hdb_Tables.cpp.

References fio_Transaction::EndTransaction(), log_FUNC_m, hdb_NameOwner_t::nameIdx, hdb_NameOwner_t::nameSize, fio_RelFile::ReadRec(), fio_RelFileTrans::ReleaseVectorIdx(), size, fio_Transaction::StartTransaction(), and fio_BasicString::Write2DB().

Referenced by hsm_ActiveFH::ActiveToList(), and hsm_ActiveFH::OrphanedToMigList().

00365                                               {
00366     log_FUNC_m(ActiveToList);
00367     if (a_nameOwnIdx == 0) {
00368         return;
00369     }
00370 
00371     // get name from DB
00372     hdb_NameOwner_t nameOwn;
00373     g_NameOwner_p->ReadRec(a_nameOwnIdx, &nameOwn);
00374 
00375     hdb_String name(nameOwn.nameSize, nameOwn.nameIdx);
00376 
00377     a_trans.StartTransaction();
00378 
00379     // remove nameOwnIdx
00380     g_NameOwner_p->ReleaseVectorIdx(a_nameOwnIdx, 1, &a_trans);
00381     // remove name
00382     ivd_RecordIDX_t nameIdx(0);
00383     ivd_VectorSize_t size(0);
00384     name.erase();
00385     name.Write2DB(size, nameIdx, a_trans);  // release old name
00386 
00387     a_trans.EndTransaction();
00388 }

Here is the call graph for this function:

Here is the caller graph for this function:

void IVD_HSMDB_DECL_d hdbReadNameOwnRec ( ivd_RecordIDX_t  a_nameOwnIdx,
ivd_RecordIDX_t a_dirTreeIdx,
hdb_String a_name,
hdb_DirNode_t a_ownerRec 
)

get name, owner inode and oner nameOwnIdx from DB by using nameOwnIdx.

helper method return name and fill owner's dirNode struct

Definition at line 334 of file hdb_Tables.cpp.

References hdb_DirNode_t::Clear(), dbg_DETAIL, hdb_NameOwner_t::dirTreeIdx, hdbReadNameOwnRec(), log_DBG_m, log_FUNC_m, hdb_NameOwner_t::nameIdx, hdb_NameOwner_t::nameSize, and fio_RelFile::ReadRec().

Referenced by hsm_ActiveFH::ActiveToList(), hdb_Tables::DumpActiveEntries(), hdb_Tables::DumpMigratedFiles(), hdb_Tables::DumpReleaseCand(), hdbReadNameOwnRec(), hsmdbGetPath(), hsmGetDirFH(), hsm_FileHeader::InitActive(), hsm_ActiveFH::OrphanedToMigList(), and hsm_FHrelc::Truncate().

00337                                                     {
00338     
00339     log_FUNC_m(hdbReadNameOwnRec);
00340     // get name and owner from DB
00341     log_DBG_m(dbg_DETAIL, "Read NameOwnRec from idx " << a_nameOwnIdx);
00342     hdb_NameOwner_t nameOwn;
00343     if (a_nameOwnIdx > 0) {
00344         g_NameOwner_p->ReadRec(a_nameOwnIdx, &nameOwn);
00345         hdb_String name(nameOwn.nameSize, nameOwn.nameIdx);
00346         a_name = name;
00347 
00348         log_DBG_m(dbg_DETAIL, "Got NameOwnRec  " << nameOwn);
00349         if (nameOwn.dirTreeIdx > 0) {
00350             g_DirTree_p->ReadRec(nameOwn.dirTreeIdx, &a_ownerRec);
00351         }
00352         else {
00353             a_ownerRec.Clear();
00354         }
00355     }
00356     else {
00357         a_ownerRec.Clear();
00358         a_name.empty();
00359     }
00360     a_dirTreeIdx = nameOwn.dirTreeIdx;
00361 }

Here is the call graph for this function:

Here is the caller graph for this function:

cmn_Path IVD_HSMDB_DECL_d hsmdbGetPath ( hdb_DirNode_t a_dir,
hdb_DirTreeVec_t dirNode_v 
)

cmn_Path IVD_HSMDB_DECL_d hsmdbGetPath ( hdb_DirNode_t a_dir  ) 

Definition at line 293 of file hdb_Tables.cpp.

References hdbReadNameOwnRec(), hsmdbGetPath(), log_FUNC_m, and hdb_DirNode_t::nameOwnIdx.

Referenced by hsm_ActiveFH::ActiveToList(), hdb_Tables::DumpActiveEntries(), hdb_Tables::DumpMigratedFiles(), hdb_Tables::DumpReleaseCand(), hsmdbGetPath(), hsmGetDirFH(), hsm_ActiveFH::OrphanedToMigList(), and hsm_FHrelc::Truncate().

00293                                              {
00294     log_FUNC_m(hsmdbGetPath);
00295     // try to find FH by inode
00296         
00297     hdb_String name;
00298     hdb_DirNode_t ownDir;
00299     ivd_RecordIDX_t dirIdx;
00300     // get dir name and ownerDirNode record
00301     hdbReadNameOwnRec(a_dir.nameOwnIdx, dirIdx, name, ownDir);
00302 
00303     if (ownDir.nameOwnIdx > 0) {  // if has owner get it
00304         // ivoke to recursion, call itself
00305         return hsmdbGetPath(ownDir) + name;
00306     }
00307         
00308     return name;
00309 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

IVD_HSMDB_DECL_d fio_CirFileTrans* g_Active_p

Definition at line 46 of file hdb_Tables.cpp.

Referenced by hsm_Containers::hsm_Containers().

IVD_HSMDB_DECL_d fio_VarLenRFT* g_DirEntName_p

global pointers to relative files

Definition at line 42 of file hdb_Tables.cpp.

IVD_HSMDB_DECL_d fio_RelFileTrans* g_DirTree_p

Definition at line 43 of file hdb_Tables.cpp.

Referenced by hsm_FileHeader::StoreDirTreeRec().

IVD_HSMDB_DECL_d fio_RelFileTrans* g_File2hdbID_p

IVD_HSMDB_DECL_d fio_DataBase* g_hsmDB_p

IVD_HSMDB_DECL_d fio_RelFileTrans* g_NameOwner_p

Definition at line 48 of file hdb_Tables.cpp.

Referenced by main().

Definition at line 47 of file hdb_Tables.cpp.

Referenced by main().

Definition at line 49 of file hdb_Tables.cpp.

Referenced by main().


Generated on Mon Feb 27 18:54:12 2012 for OPENARCHIVE by  doxygen 1.5.6