> For the complete documentation index, see [llms.txt](https://documentation.alluxio.io/os-cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.alluxio.io/os-cn/api/clients-hadoop.md).

# 兼容Hadoop的Java

Alluxio通过提供文件系统接口提供对文件的访问方式。Alluxio中的文件提供一次性写的语义：文件在全部写完之后不可修改，并且在全部 写完之前不可以读。Alluxio提供两种不同的文件系统API，Alluxio文件系统API以及兼容Hadoop的API。Alluxio API提供额外的功能性，而用户可以直接使用兼容Hadoop的API获取Hadoop原生API的功能，不用修改已有代码。

Alluxio有[原生文件系统Java客户端](/os-cn/api/fs-api.md)的包装类，可以提供兼容Hadoop的`FileSystem`接口。使用这个客户端时， Hadoop文件操作会被转换为文件系统操作。最新的关于`文件系统`接口的文档可以在[这里](http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSystem.html)找到。

兼容Hadoop的接口是为了方便而提供的，这样可以使用户重新利用之前为Hadoop写的代码。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.alluxio.io/os-cn/api/clients-hadoop.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
