Ejemplo n.º 1
0
        private string MakeProcessServiceConfig()
        {
            var configDoc = new XDocument();

            var docElement = new XElement("PeloponneseConfig");

            var psElement = new XElement("ProcessService");

            var psPortElement = new XElement("Port");

            psPortElement.Value = "8471";
            psElement.Add(psPortElement);

            var psPrefixElement = new XElement("Prefix");

            psPrefixElement.Value = "/peloponnese/dpservice/";
            psElement.Add(psPrefixElement);

            var envElement = new XElement("Environment");

            psElement.Add(envElement);

            docElement.Add(psElement);

            configDoc.Add(docElement);

            string psConfigPath = DryadLinqCodeGen.GetPathForGeneratedFile("psConfig.xml", null);

            configDoc.Save(psConfigPath);

            return(psConfigPath);
        }
Ejemplo n.º 2
0
        private string GenerateConfig()
        {
            var psConfigPath = MakeProcessServiceConfig();
            var configPath   = DryadLinqCodeGen.GetPathForGeneratedFile("ppmConfig.xml", null);

            var configDoc = MakeConfig(psConfigPath, null);

            configDoc.Save(configPath);

            return(configPath);
        }
Ejemplo n.º 3
0
        private XDocument GenerateConfig()
        {
            string psConfigPath = MakeProcessServiceConfig();

            // this will cause the psConfig to be uploaded to the DFS during MakeConfig
            AddLocalFile(psConfigPath);

            var configDoc = MakeConfig(psConfigPath);

            string configPath = DryadLinqCodeGen.GetPathForGeneratedFile("ppmConfig.xml", null);

            configDoc.Save(configPath);

            return(MakeLauncherConfig(configPath));
        }
Ejemplo n.º 4
0
        private string MakeProcessServiceConfig()
        {
            var configDoc = new XDocument();

            var docElement = new XElement("PeloponneseConfig");

            var psElement = new XElement("ProcessService");

            var psPortElement = new XElement("Port");

            psPortElement.Value = "8472";
            psElement.Add(psPortElement);

            var psPrefixElement = new XElement("Prefix");

            psPrefixElement.Value = "/peloponnese/dpservice/";
            psElement.Add(psPrefixElement);

            var environment = new Dictionary <string, string>();

            environment.Add("PATH", Environment.GetEnvironmentVariable("PATH") + ";" + Context.PeloponneseHomeDirectory);
            var jarPath = Path.Combine(Context.PeloponneseHomeDirectory, "Microsoft.Research.Peloponnese.HadoopBridge.jar");

            environment.Add("PELOPONNESE_ADDITIONAL_CLASSPATH", jarPath);
            environment.Add("DRYAD_THREADS_PER_WORKER", Context.ThreadsPerWorker.ToString());

            var envElement = new XElement("Environment");

            foreach (var e in environment)
            {
                var varElement = new XElement("Variable");
                varElement.SetAttributeValue("var", e.Key);
                varElement.Value = e.Value;
                envElement.Add(varElement);
            }

            psElement.Add(envElement);

            docElement.Add(psElement);

            configDoc.Add(docElement);

            string psConfigPath = DryadLinqCodeGen.GetPathForGeneratedFile("psConfig.xml", null);

            configDoc.Save(psConfigPath);

            return(psConfigPath);
        }
Ejemplo n.º 5
0
        private XDocument GenerateConfig()
        {
            XElement peloponneseResource = ConfigHelpers.MakePeloponneseResourceGroup(
                Context.Cluster.DfsClient, Context.PeloponneseHomeDirectory);

            string psConfigPath = MakeProcessServiceConfig();

            // this will cause the psConfig to be uploaded to the DFS during MakeConfig
            AddLocalFile(psConfigPath);

            var configDoc = MakeConfig(psConfigPath, peloponneseResource);

            string configPath = DryadLinqCodeGen.GetPathForGeneratedFile("ppmConfig.xml", null);

            configDoc.Save(configPath);

            return(MakeLauncherConfig(configPath, peloponneseResource));
        }
Ejemplo n.º 6
0
        private string MakeProcessServiceConfig()
        {
            var configDoc = new XDocument();

            var docElement = new XElement("PeloponneseConfig");

            var psElement = new XElement("ProcessService");

            var psPortElement = new XElement("Port");

            psPortElement.Value = "8471";
            psElement.Add(psPortElement);

            var psPrefixElement = new XElement("Prefix");

            psPrefixElement.Value = "/peloponnese/dpservice/";
            psElement.Add(psPrefixElement);

            var environment = new Dictionary <string, string>();

            environment.Add(Constants.LoggingLevelEnvVar, Constants.LoggingStringFromLevel((int)Context.RuntimeLoggingLevel).ToString());
            environment.Add("DRYAD_THREADS_PER_WORKER", Context.ThreadsPerWorker.ToString());

            var envElement = new XElement("Environment");

            foreach (var e in environment)
            {
                var varElement = new XElement("Variable");
                varElement.SetAttributeValue("var", e.Key);
                varElement.Value = e.Value;
                envElement.Add(varElement);
            }
            psElement.Add(envElement);

            docElement.Add(psElement);

            configDoc.Add(docElement);

            string psConfigPath = DryadLinqCodeGen.GetPathForGeneratedFile("psConfig.xml", null);

            configDoc.Save(psConfigPath);

            return(psConfigPath);
        }
Ejemplo n.º 7
0
        static DryadLinqClientLog()
        {
            string path = DryadLinqCodeGen.GetPathForGeneratedFile(CLIENT_LOG_FILENAME, null);

            s_writer = new StreamWriter(path);
        }
Ejemplo n.º 8
0
 internal static string GetClientSideObjectStorePath()
 {
     return(DryadLinqCodeGen.GetPathForGeneratedFile(ObjectStoreFileName, null));
 }