예제 #1
0
 internal ParameterParser(QueryStringDecoder decoder, Configuration conf)
 {
     this.path = DecodeComponent(Sharpen.Runtime.Substring(decoder.Path(), WebHdfsHandler
                                                           .WebhdfsPrefixLength), Charsets.Utf8);
     this.@params = decoder.Parameters();
     this.conf    = conf;
 }
예제 #2
0
        /// <exception cref="System.IO.FileNotFoundException"/>
        private static string GetPath(QueryStringDecoder decoder)
        {
            string path = decoder.Path();

            if (path.StartsWith(WebHdfsHandler.WebhdfsPrefix))
            {
                return(Sharpen.Runtime.Substring(path, WebHdfsHandler.WebhdfsPrefixLength));
            }
            else
            {
                throw new FileNotFoundException("Path: " + path + " should " + "start with " + WebHdfsHandler
                                                .WebhdfsPrefix);
            }
        }