public static DgraphComponent CreateDgraphComponent(ApplicationType appType, DgraphComponentType dgraph)
        {
            var ht = GetHost(appType, dgraph.hostID);
            var component = new DgraphComponent(dgraph.componentID, appType.applicationID, ht)
                {
                    WorkingDir = dgraph.workingDir,
                    LogDir = ResolveRelativePath(dgraph.workingDir, Path.GetDirectoryName(dgraph.logFile)),
                    InputDirectory = ResolveRelativePath(dgraph.workingDir,
                                                         RemovePrefixNameFromDir(dgraph.inputPrefix)),
                    UpdateDir = ResolveRelativePath(dgraph.workingDir, dgraph.updateDir),
                    UpdateLogDir = ResolveRelativePath(dgraph.workingDir, Path.GetDirectoryName(dgraph.updateLogFile))
                };
            LoadCustomProperties(component, dgraph);
            component.IndexDistributionDir = ResolveRelativePath(dgraph.workingDir,
                                                                 component.CustomProps["localIndexDir"]);
            component.DataPrefix = GetDataPrefixFromDir(dgraph.inputPrefix);
            component.Port = dgraph.port;
            component.HostName = ht.hostname;

            return component;
        }
        public static DgraphComponent CreateDgraphComponent(ApplicationType appType, DgraphComponentType dgraph)
        {
            var ht        = GetHost(appType, dgraph.hostID);
            var component = new DgraphComponent(dgraph.componentID, appType.applicationID, ht)
            {
                WorkingDir     = dgraph.workingDir,
                LogDir         = ResolveRelativePath(dgraph.workingDir, Path.GetDirectoryName(dgraph.logFile)),
                InputDirectory = ResolveRelativePath(dgraph.workingDir,
                                                     RemovePrefixNameFromDir(dgraph.inputPrefix)),
                UpdateDir    = ResolveRelativePath(dgraph.workingDir, dgraph.updateDir),
                UpdateLogDir = ResolveRelativePath(dgraph.workingDir, Path.GetDirectoryName(dgraph.updateLogFile))
            };

            LoadCustomProperties(component, dgraph);
            component.IndexDistributionDir = ResolveRelativePath(dgraph.workingDir,
                                                                 component.CustomProps["localIndexDir"]);
            component.DataPrefix = GetDataPrefixFromDir(dgraph.inputPrefix);
            component.Port       = dgraph.port;
            component.HostName   = ht.hostname;

            return(component);
        }