コード例 #1
0
 public void SetUp()
 {
     _hostname       = "gis.inf.elte.hu";
     _portNumber     = 14000;
     _authentication = new HadoopUsernameAuthentication("hduser");
     _directoryPath  = "/UnitTest" + DateTime.Now.ToString("yyyyMMddHHmmss");
 }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HadoopReadFileOperation"/> class.
        /// </summary>
        /// <param name="client">The HTTP client.</param>
        /// <param name="path">The path.</param>
        /// <param name="authentication">The authentication.</param>
        /// <param name="offset">The zero based byte offset in the file.</param>
        /// <param name="length">The number of bytes to be read.</param>
        /// <exception cref="System.ArgumentOutOfRangeException">
        /// The offset is less than 0.
        /// or
        /// The length is less than 0.
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        /// The client is null.
        /// or
        /// The path is null.
        /// or
        /// The authentication is null.
        /// </exception>
        /// <exception cref="System.ArgumentException">The path is empty.</exception>
        public HadoopReadFileOperation(HttpClient client, String path, IHadoopFileSystemAuthentication authentication, Int64 offset, Int64 length) : base(client, null, path, authentication)
        {
            if (offset < 0)
            {
                throw new ArgumentOutOfRangeException("offset", "The offset is less than 0.");
            }
            if (length < 0)
            {
                throw new ArgumentOutOfRangeException("length", "The length is less than 0.");
            }

            Offset = offset;
            Length = length;
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HadoopRenameOperation"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="authentication">The authentication.</param>
        /// <param name="recursive">A value indicating whether the deletion is recursive.</param>
        /// <exception cref="System.ArgumentNullException">
        /// The path is null.
        /// or
        /// The authentication is null.
        /// or
        /// The destination path is null.
        /// </exception>
        /// <exception cref="System.ArgumentException">
        /// The path is empty.
        /// or
        /// The destination path is empty.
        /// </exception>
        public HadoopRenameOperation(String path, IHadoopFileSystemAuthentication authentication, String destination)
            : base(path, authentication)
        {
            if (destination == null)
            {
                throw new ArgumentNullException("destination", "The destination path is null.");
            }
            if (String.IsNullOrEmpty(destination))
            {
                throw new ArgumentException("The destination path is empty.", "destination");
            }

            Destination = destination;
        }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HadoopFileSystemOperation" /> class.
        /// </summary>
        /// <param name="client">The HTTP client.</param>
        /// <param name="content">The HTTP content.</param>
        /// <param name="path">The path of the operation.</param>
        /// <param name="authentication">The authentication.</param>
        /// <exception cref="System.ArgumentNullException">
        /// The client is null.
        /// or
        /// The path is null.
        /// or
        /// The authentication is null.
        /// </exception>
        /// <exception cref="System.ArgumentException">The path is empty.</exception>
        protected HadoopFileSystemOperation(HttpClient client, HttpContent content, String path, IHadoopFileSystemAuthentication authentication)
            : this(client, content)
        {
            if (path == null)
            {
                throw new ArgumentNullException("path", "The path is null.");
            }
            if (String.IsNullOrEmpty(path))
            {
                throw new ArgumentException("The path is empty.", "path");
            }
            if (authentication == null)
            {
                throw new ArgumentNullException("authentication", "The authentication is null.");
            }

            Path           = path;
            Authentication = authentication;
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HadoopReadFileOperation"/> class.
 /// </summary>
 /// <param name="path">The path.</param>
 /// <param name="authentication">The authentication.</param>
 /// <exception cref="System.ArgumentNullException">
 /// The client is null.
 /// or
 /// The path is null.
 /// or
 /// The authentication is null.
 /// </exception>
 /// <exception cref="System.ArgumentException">The path is empty.</exception>
 public HadoopReadFileOperation(HttpClient client, String path, IHadoopFileSystemAuthentication authentication)
     : base(client, null, path, authentication)
 {
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HadoopReadFileOperation" /> class.
 /// </summary>
 /// <param name="path">The path.</param>
 /// <param name="authentication">The authentication.</param>
 /// <exception cref="System.ArgumentNullException">
 /// The path is null.
 /// or
 /// The authentication is null.
 /// </exception>
 /// <exception cref="System.ArgumentException">The path is empty.</exception>
 public HadoopReadFileOperation(String path, IHadoopFileSystemAuthentication authentication)
     : base(path, authentication)
 {
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HadoopWriteFileOperation"/> class.
 /// </summary>
 /// <param name="path">The path.</param>
 /// <param name="authentication">The authentication.</param>
 /// <param name="recursive">A value indicating whether the deletion is recursive.</param>
 /// <exception cref="System.ArgumentNullException">
 /// The client is null.
 /// or
 /// The path is null.
 /// or
 /// The authentication is null.
 /// </exception>
 /// <exception cref="System.ArgumentException">The path is empty.</exception>
 public HadoopWriteFileOperation(HttpClient client, HttpContent content, String path, IHadoopFileSystemAuthentication authentication) : base(client, content, path, authentication)
 {
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HadoopCreateDirectoryOperation"/> class.
 /// </summary>
 /// <param name="client">The HTTP client.</param>
 /// <param name="path">The path.</param>
 /// <param name="authentication">The authentication.</param>
 /// <exception cref="System.ArgumentNullException">
 /// The client is null.
 /// or
 /// The path is null.
 /// or
 /// The authentication is null.
 /// </exception>
 /// <exception cref="System.ArgumentException">The path is empty.</exception>
 public HadoopCreateDirectoryOperation(HttpClient client, String path, IHadoopFileSystemAuthentication authentication) : base(client, null, path, authentication)
 {
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HadoopCreateDirectoryOperation"/> class.
 /// </summary>
 /// <param name="path">The path.</param>
 /// <param name="authentication">The authentication.</param>
 /// <exception cref="System.ArgumentNullException">
 /// The path is null.
 /// or
 /// The authentication is null.
 /// </exception>
 /// <exception cref="System.ArgumentException">The path is empty.</exception>
 public HadoopCreateDirectoryOperation(String path, IHadoopFileSystemAuthentication authentication) : base(path, authentication)
 {
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HadoopDeleteOperation"/> class.
 /// </summary>
 /// <param name="path">The path.</param>
 /// <param name="authentication">The authentication.</param>
 /// <param name="recursive">A value indicating whether the deletion is recursive.</param>
 /// <exception cref="System.ArgumentNullException">
 /// The path is null.
 /// or
 /// The authentication is null.
 /// </exception>
 /// <exception cref="System.ArgumentException">The path is empty.</exception>
 public HadoopDeleteOperation(String path, IHadoopFileSystemAuthentication authentication, Boolean recursive) : base(path, authentication)
 {
     Recursive = recursive;
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HadoopDeleteOperation"/> class.
 /// </summary>
 /// <param name="path">The path.</param>
 /// <param name="authentication">The authentication.</param>
 /// <param name="recursive">A value indicating whether the deletion is recursive.</param>
 /// <exception cref="System.ArgumentNullException">
 /// The client is null.
 /// or
 /// The path is null.
 /// or
 /// The authentication is null.
 /// </exception>
 /// <exception cref="System.ArgumentException">The path is empty.</exception>
 public HadoopDeleteOperation(HttpClient client, String path, IHadoopFileSystemAuthentication authentication, Boolean recursive) : base(client, null, path, authentication)
 {
     Recursive = recursive;
 }