You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/11 22:26:04 UTC

[GitHub] [arrow] davisusanibar commented on a diff in pull request #12847: ARROW-15577: [Java][Doc] WIP - Apache Arrow Flight documentation

davisusanibar commented on code in PR #12847:
URL: https://github.com/apache/arrow/pull/12847#discussion_r847789324


##########
docs/source/java/flight.rst:
##########
@@ -0,0 +1,302 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+.. or more contributor license agreements.  See the NOTICE file
+.. distributed with this work for additional information
+.. regarding copyright ownership.  The ASF licenses this file
+.. to you under the Apache License, Version 2.0 (the
+.. "License"); you may not use this file except in compliance
+.. with the License.  You may obtain a copy of the License at
+
+..   http://www.apache.org/licenses/LICENSE-2.0
+
+.. Unless required by applicable law or agreed to in writing,
+.. software distributed under the License is distributed on an
+.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.. KIND, either express or implied.  See the License for the
+.. specific language governing permissions and limitations
+.. under the License.
+
+================
+Arrow Flight RPC
+================
+
+Arrow Flight is an RPC framework for efficient transfer of Flight data
+over the network.
+
+.. contents::
+
+.. seealso::
+
+   :doc:`Flight protocol documentation <../format/Flight>`
+        Documentation of the Flight protocol, including how to use
+        Flight conceptually.
+
+   `Java Cookbook <https://arrow.apache.org/cookbook/java/flight.html>`_
+        Recipes for using Arrow Flight in Java.
+
+Writing a Flight Service
+========================
+
+Arrow Flight is a development framework to offer to us the building blocks
+to implement applications base on our needs.
+
+In this journey, you need to implement how do you are planning to expose
+your business operations in base of RPC Methods and Request Patterns
+provided by Flight.
+
+For Flight Server side operations you need to implement FlightProducer interface
+methods.
+
+.. code-block:: Java
+
+    public class TutorialFlightProducer implements FlightProducer {
+        @Override
+        // Override methods or use NoOpFlightProducer for only methods needed
+    }
+

Review Comment:
   Added



##########
docs/source/java/flight.rst:
##########
@@ -0,0 +1,302 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+.. or more contributor license agreements.  See the NOTICE file
+.. distributed with this work for additional information
+.. regarding copyright ownership.  The ASF licenses this file
+.. to you under the Apache License, Version 2.0 (the
+.. "License"); you may not use this file except in compliance
+.. with the License.  You may obtain a copy of the License at
+
+..   http://www.apache.org/licenses/LICENSE-2.0
+
+.. Unless required by applicable law or agreed to in writing,
+.. software distributed under the License is distributed on an
+.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.. KIND, either express or implied.  See the License for the
+.. specific language governing permissions and limitations
+.. under the License.
+
+================
+Arrow Flight RPC
+================
+
+Arrow Flight is an RPC framework for efficient transfer of Flight data
+over the network.
+
+.. contents::
+
+.. seealso::
+
+   :doc:`Flight protocol documentation <../format/Flight>`
+        Documentation of the Flight protocol, including how to use
+        Flight conceptually.
+
+   `Java Cookbook <https://arrow.apache.org/cookbook/java/flight.html>`_
+        Recipes for using Arrow Flight in Java.
+
+Writing a Flight Service
+========================
+
+Arrow Flight is a development framework to offer to us the building blocks
+to implement applications base on our needs.
+
+In this journey, you need to implement how do you are planning to expose
+your business operations in base of RPC Methods and Request Patterns
+provided by Flight.
+
+For Flight Server side operations you need to implement FlightProducer interface
+methods.
+
+.. code-block:: Java
+
+    public class TutorialFlightProducer implements FlightProducer {
+        @Override
+        // Override methods or use NoOpFlightProducer for only methods needed
+    }
+
+Also you need to specify where to listen for, let's combine producer and location
+to create and start the Flight Server. This will start the server, but won't block
+the rest of the program. Call `FlightServer.awaitTermination` to block until the
+server stops.
+
+.. code-block:: Java
+
+    import org.apache.arrow.flight.Action;
+    import org.apache.arrow.flight.ActionType;
+    import org.apache.arrow.flight.Criteria;
+    import org.apache.arrow.flight.FlightDescriptor;
+    import org.apache.arrow.flight.FlightInfo;
+    import org.apache.arrow.flight.FlightProducer;
+    import org.apache.arrow.flight.FlightServer;
+    import org.apache.arrow.flight.FlightStream;
+    import org.apache.arrow.flight.Location;
+    import org.apache.arrow.flight.PutResult;
+    import org.apache.arrow.flight.Result;
+    import org.apache.arrow.flight.SchemaResult;
+    import org.apache.arrow.flight.Ticket;
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.util.AutoCloseables;
+
+    class TutorialFlightProducer implements FlightProducer {
+        @Override
+        // Override methods or use NoOpFlightProducer for only methods needed
+    }

Review Comment:
   Deleted



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org