Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 67CFA200B88 for ; Thu, 8 Sep 2016 07:21:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 66703160AD4; Thu, 8 Sep 2016 05:21:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1ACB7160ACF for ; Thu, 8 Sep 2016 07:21:16 +0200 (CEST) Received: (qmail 99405 invoked by uid 500); 8 Sep 2016 05:21:16 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 99367 invoked by uid 99); 8 Sep 2016 05:21:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2016 05:21:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D0FEAC0361 for ; Thu, 8 Sep 2016 05:21:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id w0VUYfoT9SKE for ; Thu, 8 Sep 2016 05:20:59 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 87E7B60E30 for ; Thu, 8 Sep 2016 05:20:42 +0000 (UTC) Received: (qmail 96317 invoked by uid 99); 8 Sep 2016 05:20:41 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2016 05:20:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2C21EEF79A; Thu, 8 Sep 2016 05:20:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: espino@apache.org To: commits@hawq.incubator.apache.org Date: Thu, 08 Sep 2016 05:20:59 -0000 Message-Id: In-Reply-To: <8372746fe8bb468e9f2a5cc50ea66ecd@git.apache.org> References: <8372746fe8bb468e9f2a5cc50ea66ecd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [20/54] [partial] incubator-hawq git commit: HAWQ-959. revert thrift build commands. archived-at: Thu, 08 Sep 2016 05:21:19 -0000 http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/928eade3/depends/thirdparty/thrift/contrib/Rebus/ServiceImpl/Client.cs ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/contrib/Rebus/ServiceImpl/Client.cs b/depends/thirdparty/thrift/contrib/Rebus/ServiceImpl/Client.cs deleted file mode 100644 index 2408041..0000000 --- a/depends/thirdparty/thrift/contrib/Rebus/ServiceImpl/Client.cs +++ /dev/null @@ -1,157 +0,0 @@ -/** - * 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. - */ - -using Rebus; -using Rebus.Configuration; -using Rebus.Messages; -using Rebus.RabbitMQ; -using System; -using System.Collections.Generic; -using System.IO; -using Thrift.Protocol; -using Thrift.Transport; - -/* - * The client emits calls to BasicMathServers - * - * The client implements the BasicMathClient service. - * If the server has processed our request, we get the results back through this service - */ - -namespace RebusSample.Client -{ - - // handler to be registered with Rebus - class MathResponseCallHandler : IHandleMessages - { - public void Handle(MathResponseCall message) - { - // Thrift protocol/transport stack - var stm = new MemoryStream(message.rawBytes); - var trns = new TStreamTransport(stm, null); - var prot = new TBinaryProtocol(trns); - - // create a processor and let him handle the call - var hndl = new MathResponsesHandler(); - var proc = new BasicMathClient.Processor(hndl); - proc.Process(prot, null); // oneway only - } - } - - - // serves incoming responses with calculation results - internal class MathResponsesHandler : BasicMathClient.Iface - { - public void FourResults(int added, int multiplied, int subtracted, int divided) - { - Console.WriteLine("added = {0}", added); - Console.WriteLine("multiplied= {0}", multiplied); - Console.WriteLine("subtracted = {0}", subtracted); - Console.WriteLine("divided = {0}", divided); - - PingAndDoAnotherCalculation(); - } - - - public void ThreeResults(int added, int multiplied, int subtracted) - { - Console.WriteLine("added = {0}", added); - Console.WriteLine("multiplied= {0}", multiplied); - Console.WriteLine("subtracted = {0}", subtracted); - Console.WriteLine("DIV/0 error during division"); - - PingAndDoAnotherCalculation(); - } - - - public void Pong(long value) - { - var latency = DateTime.Now.Ticks - value; - Console.WriteLine("Ping took {0} ms", new DateTime(latency).Millisecond); - } - - - private void PingAndDoAnotherCalculation() - { - var random = new Random(); - var client = new MathRequestClient("localhost"); - client.Ping(DateTime.Now.Ticks); - client.DoTheMath(random.Next(), random.Next()); - } - } - - - // provides the client-side interface for calculation requests - internal class MathRequestClient : BasicMathServer.Iface - { - private BuiltinContainerAdapter MQAdapter; - - - public MathRequestClient(string server) - { - MQAdapter = new BuiltinContainerAdapter(); - Configure.With(MQAdapter) - .Transport(t => t.UseRabbitMqInOneWayMode("amqp://" + server)) // we need send only - .MessageOwnership(o => o.FromRebusConfigurationSection()) - .CreateBus().Start(); - } - - - public void SerializeThriftCall(Action action) - { - // Thrift protocol/transport stack - var stm = new MemoryStream(); - var trns = new TStreamTransport(null, stm); - var prot = new TBinaryProtocol(trns); - - // serialize the call into a bunch of bytes - var client = new BasicMathServer.Client(prot); - if( action != null) - action(client); - else - throw new ArgumentException("action must not be null"); - - // make sure everything is written to the MemoryStream - trns.Flush(); - - // send the message - var msg = new MathRequestCall() { rawBytes = stm.ToArray() }; - MQAdapter.Bus.Send(msg); - } - - - public void Ping(long value) - { - SerializeThriftCall(client => - { - client.Ping(value); - }); - } - - - public void DoTheMath( int arg1, int arg2) - { - SerializeThriftCall(client => - { - client.DoTheMath(arg1, arg2); - }); - } - } -} - http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/928eade3/depends/thirdparty/thrift/contrib/Rebus/ServiceImpl/Server.cs ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/contrib/Rebus/ServiceImpl/Server.cs b/depends/thirdparty/thrift/contrib/Rebus/ServiceImpl/Server.cs deleted file mode 100644 index 149d513..0000000 --- a/depends/thirdparty/thrift/contrib/Rebus/ServiceImpl/Server.cs +++ /dev/null @@ -1,143 +0,0 @@ -/** - * 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. - */ - -using Rebus; -using Rebus.Configuration; -using Rebus.Messages; -using Rebus.RabbitMQ; -using System; -using System.Collections.Generic; -using System.IO; -using Thrift.Protocol; -using Thrift.Transport; - -/* - * The server implements the BasicMathServer service . - * All results are sent back to the client via the BasicMathClient service - */ - - -namespace RebusSample.Server -{ - // handler to be registered with Rebus - class MathRequestCallHandler : IHandleMessages - { - public void Handle(MathRequestCall message) - { - // Thrift protocol/transport stack - var stm = new MemoryStream(message.rawBytes); - var trns = new TStreamTransport(stm, null); - var prot = new TBinaryProtocol(trns); - - // create a processor and let him handle the call - var hndl = new MathRequestsHandler(); - var proc = new BasicMathServer.Processor(hndl); - proc.Process(prot, null); // oneway only - } - } - - - // serves incoming calculation requests - internal class MathRequestsHandler : BasicMathServer.Iface - { - public void Ping(long value) - { - var client = new MathResponseClient("localhost"); - client.Pong(value); - } - - - public void DoTheMath(int arg1, int arg2) - { - var client = new MathResponseClient("localhost"); - if( arg2 != 0) - client.FourResults( arg1+arg2, arg1*arg2, arg1-arg2, arg1/arg2); - else - client.ThreeResults( arg1+arg2, arg1*arg2, arg1-arg2); - } - } - - - // provides the client-side interface for calculation responses - internal class MathResponseClient : BasicMathClient.Iface - { - private BuiltinContainerAdapter MQAdapter; - - - public MathResponseClient(string server) - { - MQAdapter = new BuiltinContainerAdapter(); - Configure.With(MQAdapter) - .Transport(t => t.UseRabbitMqInOneWayMode("amqp://" + server)) // we need send only - .MessageOwnership(o => o.FromRebusConfigurationSection()) - .CreateBus().Start(); - } - - - public void SerializeThriftCall(Action action) - { - // Thrift protocol/transport stack - var stm = new MemoryStream(); - var trns = new TStreamTransport(null, stm); - var prot = new TBinaryProtocol(trns); - - // serialize the call into a bunch of bytes - var client = new BasicMathClient.Client(prot); - if (action != null) - action(client); - else - throw new ArgumentException("action must not be null"); - - // make sure everything is written to the MemoryStream - trns.Flush(); - - // send the message - var msg = new MathResponseCall() { rawBytes = stm.ToArray() }; - MQAdapter.Bus.Send(msg); - } - - - public void Pong(long value) - { - SerializeThriftCall(client => - { - client.Pong(value); - }); - } - - - public void ThreeResults(int added, int multiplied, int suctracted) - { - SerializeThriftCall(client => - { - client.ThreeResults(added, multiplied, suctracted); - }); - } - - - public void FourResults(int added, int multiplied, int suctracted, int divided) - { - SerializeThriftCall(client => - { - client.FourResults(added, multiplied, suctracted, divided); - }); - } - } -} - http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/928eade3/depends/thirdparty/thrift/contrib/Rebus/sample.thrift ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/contrib/Rebus/sample.thrift b/depends/thirdparty/thrift/contrib/Rebus/sample.thrift deleted file mode 100644 index 785e2d3..0000000 --- a/depends/thirdparty/thrift/contrib/Rebus/sample.thrift +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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. - */ - - -service BasicMathServer { - oneway void DoTheMath( 1: i32 arg1, 2: i32 arg2) - oneway void Ping(1: i64 value) -} - -service BasicMathClient { - oneway void ThreeResults( 1 : i32 added, 2 : i32 multiplied, 3 : i32 subtracted); - oneway void FourResults( 1 : i32 added, 2 : i32 multiplied, 3 : i32 subtracted, 4 : i32 divided); - oneway void Pong(1: i64 value) -} http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/928eade3/depends/thirdparty/thrift/contrib/Stomp/README.md ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/contrib/Stomp/README.md b/depends/thirdparty/thrift/contrib/Stomp/README.md deleted file mode 100644 index 2e5f21c..0000000 --- a/depends/thirdparty/thrift/contrib/Stomp/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Sample code for STOMP-based Thrift clients and/or servers. - -Although the sample Thrift STOMP Transport is written in -Delphi/Pascal, it can easily serve as a starting point for -similar implementations in other languages. - -STOMP is a protocol widely supported by many messaging systems, -such as Apache ActiveMQ, RabbitMQ and many others. In particular, -it can be used to communicate with Service-Bus products like Rebus -or NServiceBus, when running against a STOMP-capable MQ system. - -A prerequisite for this sample is the Delphi STOMP Adapter written -by Daniele Teti (http://www.danieleteti.it/stomp-client), currently -hosted at Google Code (http://code.google.com/p/delphistompclient). - -At the time of writing, the STOMP adapter does not fully support -binary data. Please check whether this has been fixed, otherwise -you have to use the JSON protocol (or to fix it on your own). http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/928eade3/depends/thirdparty/thrift/contrib/Stomp/Thrift.Transport.STOMP.pas ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/contrib/Stomp/Thrift.Transport.STOMP.pas b/depends/thirdparty/thrift/contrib/Stomp/Thrift.Transport.STOMP.pas deleted file mode 100644 index 7dfb376..0000000 --- a/depends/thirdparty/thrift/contrib/Stomp/Thrift.Transport.STOMP.pas +++ /dev/null @@ -1,200 +0,0 @@ -(* - * 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. - *) - -unit Thrift.Transport.STOMP; - -interface - -uses - Classes,Windows, SysUtils, - Thrift, - Thrift.Transport, - Thrift.Protocol, - Thrift.Stream, - StompClient, - StompTypes; - -type - TStompTransportImpl = class( TStreamTransportImpl) - strict private - FData : TStringStream; - FServer : string; - FOutQueue : string; - FStompCli : IStompClient; - protected - function GetIsOpen: Boolean; override; - function Peek: Boolean; override; - public - constructor Create( const aServerAndPort, aOutQueue : string); - destructor Destroy; override; - - procedure Open(); override; - procedure Close(); override; - procedure Flush; override; - end; - - - TStompServerTransportImpl = class( TServerTransportImpl) - strict private - FServer : string; - FInQueue : string; - FClient : IStompClient; - protected - procedure Listen; override; - procedure Close; override; - function Accept( const fnAccepting: TProc): ITransport; override; - public - constructor Create( const aServerAndPort, aInQueue : string); - destructor Destroy; override; - end; - - -const - QUEUE_PREFIX = '/queue/'; - TOPIC_PREFIX = '/topic/'; - EXCHANGE_PREFIX = '/exchange/'; - - -implementation - - - -constructor TStompTransportImpl.Create( const aServerAndPort, aOutQueue : string); -var adapter : IThriftStream; -begin - FData := TStringStream.Create; - FServer := aServerAndPort; - FOutQueue := aOutQueue; - - adapter := TThriftStreamAdapterDelphi.Create( FData, FALSE); - inherited Create( nil, adapter); // output only -end; - - -destructor TStompTransportImpl.Destroy; -begin - inherited Destroy; - FreeAndNil( FData); - FStompCli := nil; -end; - - -function TStompTransportImpl.GetIsOpen: Boolean; -begin - result := (FStompCli <> nil); -end; - - -function TStompTransportImpl.Peek: Boolean; -begin - result := FALSE; // output only -end; - - -procedure TStompTransportImpl.Open; -begin - if FStompCli <> nil - then raise TTransportException.Create( TTransportException.TExceptionType.AlreadyOpen, 'already open') - else FStompCli := StompUtils.NewStomp( FServer); -end; - - -procedure TStompTransportImpl.Close; -begin - FStompCli := nil; - FData.Clear; -end; - - -procedure TStompTransportImpl.Flush; -begin - if FStompCli = nil - then raise TTransportException.Create( TTransportException.TExceptionType.NotOpen, 'not open'); - - FStompCli.Send( FOutQueue, FData.DataString); - FData.Clear; -end; - - -//--- TStompServerTransportImpl -------------------------------------------- - - -constructor TStompServerTransportImpl.Create( const aServerAndPort, aInQueue : string); -begin - inherited Create; - FServer := aServerAndPort; - FInQueue := aInQueue; -end; - - -destructor TStompServerTransportImpl.Destroy; -begin - try - Close; - finally - inherited Destroy; - end; -end; - - -procedure TStompServerTransportImpl.Listen; -begin - FClient := StompUtils.NewStomp(FServer); - FClient.Subscribe( FInQueue); -end; - - -procedure TStompServerTransportImpl.Close; -begin - if FClient <> nil then begin - FClient.Unsubscribe( FInQueue); - FClient := nil; - end; -end; - - -function TStompServerTransportImpl.Accept( const fnAccepting: TProc): ITransport; -var frame : IStompFrame; - adapter : IThriftStream; - stream : TStringStream; -begin - if FClient = nil - then raise TTransportException.Create( TTransportException.TExceptionType.NotOpen, - 'Not connected.'); - - if Assigned(fnAccepting) - then fnAccepting(); - - try - frame := FClient.Receive(MAXINT); - if frame = nil then Exit(nil); - - stream := TStringStream.Create( frame.GetBody); - adapter := TThriftStreamAdapterDelphi.Create( stream, TRUE); - result := TStreamTransportImpl.Create( adapter, nil); - - except - on E: Exception - do raise TTransportException.Create( E.ToString ); - end; -end; - - -end. - http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/928eade3/depends/thirdparty/thrift/contrib/Vagrantfile ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/contrib/Vagrantfile b/depends/thirdparty/thrift/contrib/Vagrantfile deleted file mode 100644 index d9a908d..0000000 --- a/depends/thirdparty/thrift/contrib/Vagrantfile +++ /dev/null @@ -1,133 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -# -# 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. -# - -$build_and_test = <