Esempio n. 1
0
            /// <summary>Method to be overridden by sub classes for specific behavior</summary>
            /// <exception cref="System.Exception"/>
            internal virtual int DoWorkInternal(GetConf tool, string[] args)
            {
                string value = tool.GetConf().GetTrimmed(key);

                if (value != null)
                {
                    tool.PrintOut(value);
                    return(0);
                }
                tool.PrintError("Configuration " + key + " is missing.");
                return(-1);
            }
Esempio n. 2
0
 internal int DoWork(GetConf tool, string[] args)
 {
     try
     {
         CheckArgs(args);
         return(DoWorkInternal(tool, args));
     }
     catch (Exception e)
     {
         tool.PrintError(e.Message);
     }
     return(-1);
 }
Esempio n. 3
0
            /// <exception cref="System.IO.IOException"/>
            internal override int DoWorkInternal(GetConf tool, string[] args)
            {
                Configuration config = tool.GetConf();
                IList <DFSUtil.ConfiguredNNAddress> cnnlist = DFSUtil.FlattenAddressMap(DFSUtil.GetNNServiceRpcAddressesForCluster
                                                                                            (config));

                if (!cnnlist.IsEmpty())
                {
                    foreach (DFSUtil.ConfiguredNNAddress cnn in cnnlist)
                    {
                        IPEndPoint rpc = cnn.GetAddress();
                        tool.PrintOut(rpc.GetHostName() + ":" + rpc.Port);
                    }
                    return(0);
                }
                tool.PrintError("Did not get namenode service rpc addresses.");
                return(-1);
            }
Esempio n. 4
0
 public _PrivilegedExceptionAction_316(GetConf _enclosing, string[] args)
 {
     this._enclosing = _enclosing;
     this.args       = args;
 }
Esempio n. 5
0
 /// <exception cref="System.Exception"/>
 internal override int DoWorkInternal(GetConf tool, string[] args)
 {
     this.key = args[0];
     return(base.DoWorkInternal(tool, args));
 }
Esempio n. 6
0
 /// <exception cref="System.IO.IOException"/>
 internal override int DoWorkInternal(GetConf tool, string[] args)
 {
     tool.PrintMap(DFSUtil.GetSecondaryNameNodeAddresses(tool.GetConf()));
     return(0);
 }
Esempio n. 7
0
 /// <exception cref="System.IO.IOException"/>
 internal override int DoWorkInternal(GetConf tool, string[] args)
 {
     tool.PrintMap(DFSUtil.GetNNServiceRpcAddressesForCluster(tool.GetConf()));
     return(0);
 }