├── .gitattributes
├── .gitignore
├── ClusterInterface
├── ClusterInterface.csproj
├── HttpScheduler.cs
├── Interfaces.cs
├── Process.cs
├── Properties
│ └── AssemblyInfo.cs
├── app.config
└── packages.config
├── Dryad.sln
├── DryadLinqGraphManager
├── DryadLinqApplication.cs
├── DryadLinqGraphManager.csproj
├── GraphBuilder.cs
├── LinqToDryadException.cs
├── LinqToDryadJM.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── Query.cs
├── QueryParser.cs
├── app.config
└── packages.config
├── DryadLinqTests
├── App.config
├── ApplyAndForkTests.cs
├── BasicAPITests.cs
├── DryadLinqFSharpTests
│ ├── App.config
│ ├── DryadLinqFSharpTests.fsproj
│ ├── Program.fs
│ └── packages.config
├── DryadLinqTests.csproj
├── DryadLinqTests.sln
├── GroupByReduceTests.cs
├── MiscBugFixTests.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── RangePartitionAPICoverageTests.cs
├── SerializationTestTypes.cs
├── SerializationTests.cs
├── SimpleTests.cs
├── TestLog.cs
├── TypesInQueryTests.cs
├── Utils.cs
├── WordCount.cs
└── packages.config
├── DryadVertex
└── VertexHost
│ ├── system
│ ├── channel
│ │ ├── channel.vcxproj
│ │ ├── include
│ │ │ ├── channelbuffer.h
│ │ │ ├── channelinterface.h
│ │ │ ├── channelitem.h
│ │ │ ├── channelmarshaler.h
│ │ │ ├── channelmemorybuffers.h
│ │ │ ├── channelparser.h
│ │ │ ├── concreterchannel.h
│ │ │ ├── recordarray.h
│ │ │ ├── recorditem.h
│ │ │ └── recordparser.h
│ │ ├── packages.config
│ │ └── src
│ │ │ ├── channelbuffer.cpp
│ │ │ ├── channelbufferhdfs.cpp
│ │ │ ├── channelbufferhdfs.h
│ │ │ ├── channelbuffernativereader.cpp
│ │ │ ├── channelbuffernativereader.h
│ │ │ ├── channelbuffernativewriter.cpp
│ │ │ ├── channelbuffernativewriter.h
│ │ │ ├── channelbufferqueue.cpp
│ │ │ ├── channelbufferqueue.h
│ │ │ ├── channelfifo.cpp
│ │ │ ├── channelfifo.h
│ │ │ ├── channelhelpers.cpp
│ │ │ ├── channelhelpers.h
│ │ │ ├── channelitem.cpp
│ │ │ ├── channelmarshaler.cpp
│ │ │ ├── channelparser.cpp
│ │ │ ├── channelreader.cpp
│ │ │ ├── channelreader.h
│ │ │ ├── channelwriter.cpp
│ │ │ ├── channelwriter.h
│ │ │ ├── concreterchannel.cpp
│ │ │ ├── concreterchannelhelpers.h
│ │ │ ├── managedchannel.h
│ │ │ ├── managedchannelhelpers.cpp
│ │ │ ├── managedchannelhelpers.h
│ │ │ ├── managedchannelreader.cpp
│ │ │ ├── managedchannelwriter.cpp
│ │ │ ├── memorybuffers.cpp
│ │ │ └── recorditem.cpp
│ ├── classlib
│ │ ├── classlib.vcxproj
│ │ ├── include
│ │ │ ├── DrBList.h
│ │ │ ├── DrCommon.h
│ │ │ ├── DrCriticalSection.h
│ │ │ ├── DrError.h
│ │ │ ├── DrErrorDef.h
│ │ │ ├── DrExecution.h
│ │ │ ├── DrExitCodes.h
│ │ │ ├── DrExitCodesDef.h
│ │ │ ├── DrFPrint.h
│ │ │ ├── DrFPrint_polynomials.h
│ │ │ ├── DrFunctions.h
│ │ │ ├── DrGuid.h
│ │ │ ├── DrHash.h
│ │ │ ├── DrHeap.h
│ │ │ ├── DrList.h
│ │ │ ├── DrLogging.h
│ │ │ ├── DrMemory.h
│ │ │ ├── DrMemoryStream.h
│ │ │ ├── DrNodeAddress.h
│ │ │ ├── DrProperties.h
│ │ │ ├── DrPropertiesDef.h
│ │ │ ├── DrPropertyDumper.h
│ │ │ ├── DrPropertyType.h
│ │ │ ├── DrRefCounter.h
│ │ │ ├── DrStringUtil.h
│ │ │ ├── DrTags.h
│ │ │ ├── DrTagsDef.h
│ │ │ ├── DrThread.h
│ │ │ ├── DrTypes.h
│ │ │ ├── Dryad.h
│ │ │ ├── DryadTags.h
│ │ │ ├── DryadTagsDef.h
│ │ │ ├── Interlocked.h
│ │ │ ├── LogIds.h
│ │ │ ├── LogIdsCustomized.h
│ │ │ ├── LogTagIds.h
│ │ │ ├── MSMutex.h
│ │ │ ├── PropertyIds.h
│ │ │ ├── RefCount.h
│ │ │ ├── basic_types.h
│ │ │ ├── fingerprint.h
│ │ │ └── ms_fprint.h
│ │ └── src
│ │ │ ├── DrCriticalSection.cpp
│ │ │ ├── DrError.cpp
│ │ │ ├── DrExecution.cpp
│ │ │ ├── DrExitCodes.cpp
│ │ │ ├── DrFPrint.cpp
│ │ │ ├── DrFunctions.cpp
│ │ │ ├── DrGuid.cpp
│ │ │ ├── DrHash.cpp
│ │ │ ├── DrHeap.cpp
│ │ │ ├── DrLogging.cpp
│ │ │ ├── DrMemory.cpp
│ │ │ ├── DrMemoryStream.cpp
│ │ │ ├── DrNodeAddress.cpp
│ │ │ ├── DrRefCounter.cpp
│ │ │ ├── DrStringUtil.cpp
│ │ │ ├── DrThread.cpp
│ │ │ ├── fingerprint.cpp
│ │ │ └── ms_fprint.cpp
│ ├── common
│ │ ├── common.vcxproj
│ │ ├── include
│ │ │ ├── CsEnhancedTimer.h
│ │ │ ├── DObjPool.h
│ │ │ ├── DrString.h
│ │ │ ├── cosmospropertyblock.h
│ │ │ ├── cosmosstreampropertyupdater.h
│ │ │ ├── dryadcosmosresources.h
│ │ │ ├── dryaderror.h
│ │ │ ├── dryaderrordef.h
│ │ │ ├── dryadeventcache.h
│ │ │ ├── dryadlisthelper.h
│ │ │ ├── dryadmetadata.h
│ │ │ ├── dryadmetadatatag.h
│ │ │ ├── dryadmetadatatagtypes.h
│ │ │ ├── dryadnativeport.h
│ │ │ ├── dryadopaqueresources.h
│ │ │ ├── dryadproperties.h
│ │ │ ├── dryadpropertiesdef.h
│ │ │ ├── dryadpropertydumper.h
│ │ │ ├── dryadpropertytype.h
│ │ │ ├── dryadstandaloneini.h
│ │ │ ├── dryadtags.h
│ │ │ ├── dryadtagsdef.h
│ │ │ ├── dvertexcommand.h
│ │ │ ├── errorreporter.h
│ │ │ ├── httppropertyblock.h
│ │ │ ├── orderedsendlatch.h
│ │ │ ├── portmemorybuffers.h
│ │ │ └── workqueue.h
│ │ └── src
│ │ │ ├── DObjPool.cpp
│ │ │ ├── dryadeventcache.cpp
│ │ │ ├── dryadmetadata.cpp
│ │ │ ├── dryadmetadatatag.cpp
│ │ │ ├── dryadmetadatatagtypes.cpp
│ │ │ ├── dryadnativeport.cpp
│ │ │ ├── dryadopaqueresources.cpp
│ │ │ ├── dryadpropertydumper.cpp
│ │ │ ├── dryadstandaloneini.cpp
│ │ │ ├── dvertexcommand.cpp
│ │ │ ├── errorreporter.cpp
│ │ │ ├── httppropertyblock.cpp
│ │ │ ├── portmemorybuffers.cpp
│ │ │ └── workqueue.cpp
│ ├── dprocess
│ │ ├── dprocess.vcxproj
│ │ ├── include
│ │ │ ├── dryadvertex.h
│ │ │ ├── dvertexmain.h
│ │ │ └── vertexfactory.h
│ │ ├── packages.config
│ │ └── src
│ │ │ ├── dryadvertex.cpp
│ │ │ ├── dvertexcmdlinecontrol.cpp
│ │ │ ├── dvertexcmdlinecontrol.h
│ │ │ ├── dvertexhttppncontrol.cpp
│ │ │ ├── dvertexhttppncontrol.h
│ │ │ ├── dvertexmain.cpp
│ │ │ ├── dvertexpncontrol.cpp
│ │ │ ├── dvertexpncontrol.h
│ │ │ ├── dvertexxcomputepncontrol.cpp
│ │ │ ├── dvertexxcomputepncontrol.h
│ │ │ ├── subgraphvertex.cpp
│ │ │ ├── subgraphvertex.h
│ │ │ └── vertexfactory.cpp
│ └── managedchannel
│ │ ├── AzureReader.cs
│ │ ├── AzureWriter.cs
│ │ ├── FileWriter.cs
│ │ ├── HttpReader.cs
│ │ ├── Interfaces.cs
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── Queue.cs
│ │ ├── StreamReader.cs
│ │ ├── StreamWriter.cs
│ │ ├── app.config
│ │ ├── managedchannel.csproj
│ │ └── packages.config
│ └── vertex
│ ├── VertexHostMain
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── VertexHostMain.csproj
│ ├── app.config
│ └── packages.config
│ ├── WrapperNativeInfo
│ ├── FifoChannel.cpp
│ ├── FifoInputChannel.cpp
│ ├── FifoOutputChannel.cpp
│ ├── GzipCompressionChannelTransform.cpp
│ ├── GzipDecompressionChannelTransform.cpp
│ ├── InputChannel.cpp
│ ├── NullChannelTransform.cpp
│ ├── OutputChannel.cpp
│ ├── WrapperNativeInfo.cpp
│ ├── WrapperNativeInfo.vcxproj
│ ├── WrapperNativeInfo.vcxproj.filters
│ └── stdafx.h
│ ├── WrapperNativeInfoDll
│ ├── DryadLINQNativeChannels.def
│ ├── WrapperNativeInfoDll.vcxproj
│ ├── WrapperNativeInfoDll.vcxproj.filters
│ ├── stdafx.h
│ ├── version.cpp
│ └── wrappernativeinfostubs.cpp
│ ├── include
│ ├── ChannelTransform.h
│ ├── CompressionVertex.h
│ ├── DataBlockItem.h
│ ├── FifoChannel.h
│ ├── FifoInputChannel.h
│ ├── FifoOutputChannel.h
│ ├── GzipCompressionChannelTransform.h
│ ├── GzipDecompressionChannelTransform.h
│ ├── InputChannel.h
│ ├── ManagedWrapper.h
│ ├── NullChannelTransform.h
│ ├── OutputChannel.h
│ └── wrappernativeinfo.h
│ ├── managedwrappervertex
│ ├── DataBlockItem.cpp
│ ├── ManagedWrapperVertex.cpp
│ ├── ManagedWrapperVertex.vcxproj
│ ├── ManagedWrapperVertex.vcxproj.filters
│ └── stdafx.h
│ └── vertexHost
│ ├── VertexHost.vcxproj
│ ├── VertexHost.vcxproj.filters
│ ├── app.config
│ ├── packages.config
│ ├── version.cpp
│ └── vertexHost.cpp
├── GraphManager
├── GraphManager.vcxproj
├── GraphManager.vcxproj.filters
├── filesystem
│ ├── DrAzureBlobClient.cpp
│ ├── DrAzureBlobClient.h
│ ├── DrFileSystems.h
│ ├── DrHdfsClient.cpp
│ ├── DrHdfsClient.h
│ ├── DrPartitionFile.cpp
│ └── DrPartitionFile.h
├── gang
│ ├── DrGangHeaders.h
│ ├── DrMetaData.cpp
│ ├── DrMetaData.h
│ ├── DrMetaDataTag.cpp
│ ├── DrMetaDataTag.h
│ ├── DrProperties.h
│ ├── DrProperty.cpp
│ └── DrProperty.h
├── graph
│ ├── DrDefaultParameters.h
│ ├── DrFileSystem.cpp
│ ├── DrFileSystem.h
│ ├── DrGraphExecutor.cpp
│ ├── DrGraphExecutor.h
│ ├── DrGraphHeaders.h
│ └── DrGraphParameters.cpp
├── jobmanager
│ ├── DrHeaders.h
│ ├── targetver.h
│ └── version.cpp
├── kernel
│ ├── DrCluster.cpp
│ ├── DrCluster.h
│ ├── DrClusterInternal.h
│ ├── DrKernel.h
│ ├── DrMessagePump.cpp
│ ├── DrMessagePump.h
│ ├── DrProcess.cpp
│ ├── DrProcess.h
│ ├── DrResources.cpp
│ ├── DrResources.h
│ ├── drxcompute.cpp
│ └── drxcomputeinternal.h
├── packages.config
├── reporting
│ ├── DrArtemisLegacyReporting.cpp
│ ├── DrArtemisLegacyReporting.h
│ ├── DrCalypsoReporting.cpp
│ ├── DrCalypsoReporting.h
│ └── DrReporting.h
├── shared
│ ├── DrArray.h
│ ├── DrArrayList.h
│ ├── DrAssert.h
│ ├── DrCritSec.h
│ ├── DrDictionary.h
│ ├── DrError.cpp
│ ├── DrError.h
│ ├── DrErrorInternal.h
│ ├── DrFileWriter.cpp
│ ├── DrFileWriter.h
│ ├── DrLogging.cpp
│ ├── DrLogging.h
│ ├── DrMultiMap.h
│ ├── DrRef.cpp
│ ├── DrRef.h
│ ├── DrSet.h
│ ├── DrShared.h
│ ├── DrSort.h
│ ├── DrString.cpp
│ ├── DrString.h
│ ├── DrStringUtil.cpp
│ ├── DrStringUtil.h
│ └── DrTypes.h
├── stagemanager
│ ├── DrDefaultManager.cpp
│ ├── DrDefaultManager.h
│ ├── DrDynamicAggregateManager.cpp
│ ├── DrDynamicAggregateManager.h
│ ├── DrDynamicBroadcast.cpp
│ ├── DrDynamicBroadcast.h
│ ├── DrDynamicDistributor.cpp
│ ├── DrDynamicDistributor.h
│ ├── DrDynamicRangeDistributor.cpp
│ ├── DrDynamicRangeDistributor.h
│ ├── DrPipelineSplitManager.cpp
│ ├── DrPipelineSplitManager.h
│ ├── DrStageHeaders.h
│ ├── DrStageStatistics.cpp
│ └── DrStageStatistics.h
└── vertex
│ ├── DrClique.cpp
│ ├── DrClique.h
│ ├── DrCohort.cpp
│ ├── DrCohort.h
│ ├── DrGraph.cpp
│ ├── DrGraph.h
│ ├── DrOutputGenerator.cpp
│ ├── DrOutputGenerator.h
│ ├── DrStageManager.h
│ ├── DrVertex.cpp
│ ├── DrVertex.h
│ ├── DrVertexCommand.cpp
│ ├── DrVertexCommand.h
│ ├── DrVertexHeaders.h
│ ├── DrVertexRecord.cpp
│ └── DrVertexRecord.h
├── Install.ps1
├── JobBrowser
├── Calypso
│ └── Properties
│ │ └── AssemblyInfo.cs
├── JOM
│ ├── ClusterConfiguration.cs
│ ├── ClusterStatus.cs
│ ├── JobObjectModel.csproj
│ ├── JobSummary.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── app.config
│ ├── clusteraccess.cs
│ ├── dryadlog.cs
│ ├── jobinfo.cs
│ ├── packages.config
│ └── storage.cs
├── JobBrowser.sln
├── JobBrowser
│ ├── ClusterBrowser.cs
│ ├── ClusterBrowser.designer.cs
│ ├── ClusterBrowser.resx
│ ├── ClusterConfigEditor.Designer.cs
│ ├── ClusterConfigEditor.cs
│ ├── ClusterConfigEditor.resx
│ ├── Diagnosis.cs
│ ├── DiagnosisResult.Designer.cs
│ ├── DiagnosisResult.cs
│ ├── DiagnosisResult.resx
│ ├── DryadAnalysis.ico
│ ├── DryadJobMain.cs
│ ├── JobBrowser.Designer.cs
│ ├── JobBrowser.cs
│ ├── JobBrowser.csproj
│ ├── JobBrowser.resx
│ ├── LocalDebuggingAndProfiling.cs
│ ├── LogViewer.Designer.cs
│ ├── LogViewer.cs
│ ├── LogViewer.resx
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── app.config
│ ├── app.manifest
│ ├── icons
│ │ ├── Cluster.ico
│ │ ├── ClusterBrowser.ico
│ │ ├── DryadAnalysis.ico
│ │ └── JobBrowser.ico
│ ├── jobschedule.cs
│ └── packages.config
├── Tools
│ ├── Graphlayout.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Tools.csproj
│ ├── drawingSurface.cs
│ ├── partitionedTables.cs
│ └── tools.cs
├── UsefulForms
│ ├── FilteredDataGridView.Designer.cs
│ ├── FilteredDataGridView.cs
│ ├── FilteredDataGridView.resx
│ ├── PasswordDialog.Designer.cs
│ ├── PasswordDialog.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Status.cs
│ ├── UrlDialog.Designer.cs
│ ├── UrlDialog.cs
│ ├── UrlDialog.resx
│ ├── UsefulForms.csproj
│ ├── WarningBox.Designer.cs
│ ├── WarningBox.cs
│ └── WarningBox.resx
└── doc
│ ├── clusterBrowser.png
│ ├── clusterEditor.png
│ ├── clusterManipulation.png
│ ├── clusterMenu.png
│ ├── dynamicPlan.png
│ ├── filteringVertex.png
│ ├── jobBrowser.png
│ ├── jobBrowserManual.docx
│ ├── jobFiltering.png
│ ├── jobMenu.png
│ ├── jobPlan.png
│ ├── jobSchedule.png
│ ├── jobSummary.png
│ ├── stageCode.png
│ ├── stageFiltering.png
│ ├── stageStatistics.png
│ ├── stageVertices.png
│ ├── staticPlan.png
│ ├── vertexState.png
│ ├── vertexStatistics.png
│ └── viewMenu.png
├── LICENSE.txt
├── LinqToDryad
├── Attributes.cs
├── BitVector.cs
├── CodeGenHelper.cs
├── Constants.cs
├── DataPath.cs
├── DataProvider.cs
├── DataSetInfo.cs
├── DryadLinqBinaryReader.cs
├── DryadLinqBinaryWriter.cs
├── DryadLinqBlockStream.cs
├── DryadLinqCodeGen.cs
├── DryadLinqCollection.cs
├── DryadLinqContext.cs
├── DryadLinqDecomposition.cs
├── DryadLinqEnumerable.cs
├── DryadLinqException.cs
├── DryadLinqExpression.cs
├── DryadLinqExtension.cs
├── DryadLinqFactory.cs
├── DryadLinqFaultCodes.cs
├── DryadLinqGlobals.cs
├── DryadLinqHelper.cs
├── DryadLinqJobExecutor.cs
├── DryadLinqLog.cs
├── DryadLinqMetaData.cs
├── DryadLinqNative.cs
├── DryadLinqObjectStore.cs
├── DryadLinqQuery.cs
├── DryadLinqQueryDoc.cs
├── DryadLinqQueryExplain.cs
├── DryadLinqQueryGen.cs
├── DryadLinqQueryNode.cs
├── DryadLinqQueryRuntime.cs
├── DryadLinqQueryable.cs
├── DryadLinqRecordReader.cs
├── DryadLinqRecordWriter.cs
├── DryadLinqSampler.cs
├── DryadLinqSerialization.cs
├── DryadLinqStream.cs
├── DryadLinqStringDictionary.cs
├── DryadLinqStringList.cs
├── DryadLinqTextReader.cs
├── DryadLinqTextWriter.cs
├── DryadLinqUtil.cs
├── DryadLinqVertex.cs
├── DryadLinqVertexParams.cs
├── DryadLinqVertexReader.cs
├── DryadLinqVertexWriter.cs
├── DynamicManager.cs
├── ExpressionMatcher.cs
├── ExpressionSimplifier.cs
├── ExpressionVisitor.cs
├── ForkTuple.cs
├── Hash64.cs
├── IAssociative.cs
├── IDecomposable.cs
├── IDryadLinqJobSubmission.cs
├── LineRecord.cs
├── LinqToDryad.csproj
├── LocalJobSubmission.cs
├── MultiBlockStream.cs
├── MultiEnumerable.cs
├── MultiQueryable.cs
├── NativeBlockStream.cs
├── PeloponneseJobSubmission.cs
├── Properties
│ └── AssemblyInfo.cs
├── QueryTraceLevel.cs
├── SR.Designer.cs
├── SR.resx
├── SimpleRewriter.cs
├── TypeSystem.cs
├── VertexCodeGen.cs
├── VertexEnv.cs
├── YarnJobSubmission.cs
├── app.config
└── packages.config
├── LocalScheduler
├── Computer.cs
├── LocalScheduler.cs
├── LocalScheduler.csproj
├── PeloponneseInterface.cs
├── Process.cs
├── Properties
│ └── AssemblyInfo.cs
├── Queues.cs
├── app.config
└── packages.config
├── Microsoft.Research.Dryad.nuspec
├── Microsoft.Research.Dryad.targets
├── ProcessService
├── Cache.cs
├── Constants.cs
├── HttpServer.cs
├── ProcessService.cs
├── ProcessService.csproj
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── SpillMachine.cs
├── app.config
└── packages.config
├── README.txt
├── SharedAssemblyInfo.cs
├── XmlDoc
├── Content
│ ├── GettingStarted.aml
│ ├── GettingStarted
│ │ ├── Building the Job Browser.aml
│ │ ├── QuickStart.aml
│ │ └── SettingUpCluster.aml
│ ├── Resources.aml
│ ├── Resources
│ │ └── Running a job on HDInsight.aml
│ ├── VersionHistory
│ │ ├── VersionHistory.aml
│ │ ├── v0.1.2.aml
│ │ ├── v0.2.0.aml
│ │ └── v0.2.1.aml
│ └── Welcome.aml
├── ContentLayout.content
├── Media
│ └── Dryad on Azure Architecture.png
├── XmlDoc.shfbproj
└── XmlDoc.sln
└── samples
├── Microsoft.Research.DryadLinq.Samples.nuspec
└── WordCount.cs.pp
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 |
3 | # User-specific files
4 | *.suo
5 | *.user
6 | *.sln.docstates
7 |
8 | # Visual C++ cache files
9 | ipch/
10 | *.aps
11 | *.ncb
12 | *.opensdf
13 | *.sdf
14 | *.cachefile
15 |
16 | [Dd]ebug/
17 | [Rr]elease/
18 | x64/
19 | build/
20 | [Bb]in/
21 | [Oo]bj/
22 | /Calypso/packages
23 | /DryadLinqTests/packages
24 |
--------------------------------------------------------------------------------
/ClusterInterface/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("Microsoft.Research.Dryad.HttpClusterInterface")]
28 |
29 | // The following GUID is for the ID of the typelib if this project is exposed to COM
30 | [assembly: Guid("9d262d5f-f6c5-4f9c-a1cc-7568cb399bf9")]
31 |
--------------------------------------------------------------------------------
/ClusterInterface/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ClusterInterface/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/DryadLinqGraphManager/LinqToDryadException.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | using System;
22 |
23 | namespace Microsoft.Research.Dryad.GraphManager
24 | {
25 | internal class LinqToDryadException : Exception
26 | {
27 | public static readonly uint E_FAIL = 0x80004005;
28 |
29 | public LinqToDryadException(string message)
30 | : base(message)
31 | {
32 | HResult = unchecked((int)E_FAIL);
33 | }
34 |
35 | public LinqToDryadException(string message, int hresult)
36 | : base(message)
37 | {
38 | HResult = hresult;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/DryadLinqGraphManager/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | using System.Reflection;
22 | using System.Runtime.CompilerServices;
23 | using System.Runtime.InteropServices;
24 |
25 | [assembly: Microsoft.Research.Dryad.GraphManager.ConfigDependency()]
26 |
27 | // General Information about an assembly is controlled through the following
28 | // set of attributes. Change these attribute values to modify the information
29 | // associated with an assembly.
30 | [assembly: AssemblyTitle("Microsoft.Research.Dryad.GraphManager")]
31 |
32 | // The following GUID is for the ID of the typelib if this project is exposed to COM
33 | [assembly: Guid("55c7f4b4-02ab-4309-b276-3c9ab5a927e0")]
34 |
--------------------------------------------------------------------------------
/DryadLinqGraphManager/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/DryadLinqTests/DryadLinqFSharpTests/Program.fs:
--------------------------------------------------------------------------------
1 | // Learn more about F# at http://fsharp.net
2 | // See the 'F# Tutorial' project for more help.
3 |
4 | open System
5 | open System.Collections.Generic
6 | open System.Linq
7 | open System.IO
8 | open Microsoft.Research.DryadLinq
9 |
10 | let context = new DryadLinqContext(1)
11 | let inputUri = @"partfile:///d:/DryadLinqTemp/PartFiles/foo.pt"
12 | let input = context.FromStore(inputUri)
13 |
14 | type Pair = { word : string; count : int }
15 |
16 | let Histogram (source : IQueryable) (k : int) =
17 | let words = source.SelectMany(fun (x : LineRecord) -> x.Line.Split(' ') |> Seq.ofArray)
18 | let groups = words.GroupBy(fun x -> x)
19 | let counts = groups.Select(fun (x : IGrouping) -> { word = x.Key; count = x.Count() })
20 | let ordered = counts.OrderByDescending(fun x -> x.count)
21 | ordered.Take(k)
22 |
23 | let Histogram1 (source : IQueryable) (k : int) =
24 | query {
25 | for ws in source do
26 | for w in ws.Line.Split(' ') do
27 | groupBy w into g
28 | select { word = g.Key; count = g.Count() } into winfo
29 | sortByDescending winfo.count
30 | take k
31 | }
32 |
33 | let Histogram2 =
34 | query {
35 | for ws in input do
36 | for w in ws.Line.Split(' ') do
37 | groupBy w into g
38 | select { word = g.Key; count = g.Count() } into winfo
39 | sortByDescending winfo.count
40 | take 10
41 | }
42 |
43 | for x in Histogram1 input 10 do System.Console.WriteLine(x.word + " : " + x.count.ToString())
44 |
45 | //let foo = Histogram input 10
46 | //foo.ToStore("partfile:///d:/DryadLinqTemp/PartFiles/xxx.pt").SubmitAndWait()
47 |
--------------------------------------------------------------------------------
/DryadLinqTests/DryadLinqFSharpTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DryadLinqTests/Program.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | using System;
22 | using System.Collections.Generic;
23 | using System.Linq;
24 | using System.Text;
25 | using System.IO;
26 | using System.Threading.Tasks;
27 | using System.Reflection;
28 | using Microsoft.Research.DryadLinq;
29 | using Microsoft.Research.Peloponnese.Storage;
30 |
31 | namespace DryadLinqTests
32 | {
33 | public class Program
34 | {
35 | public static void Main(string[] args)
36 | {
37 | SimpleTests.Run(args);
38 |
39 | /*
40 | *
41 | Config conf = new Config("dryad-temp", "main1", @"d:\temp\TestLog\");
42 | DryadLinqContext context = new DryadLinqContext(Config.cluster);
43 |
44 | string matchPattern = @"";
45 |
46 | TestLog.LogInit(Config.testLogPath + "BasicAPITests.txt");
47 | BasicAPITests.Run(context, matchPattern);
48 |
49 | TestLog.LogInit(Config.testLogPath + "ApplyAndForkTests.txt");
50 | ApplyAndForkTests.Run(context, matchPattern);
51 |
52 | TestLog.LogInit(Config.testLogPath + "GroupByReduceTests.txt");
53 | GroupByReduceTests.Run(context, matchPattern);
54 |
55 | TestLog.LogInit(Config.testLogPath + "RangePartitionAPICoverageTests.txt");
56 | RangePartitionAPICoverageTests.Run(context, matchPattern);
57 |
58 | TestLog.LogInit(Config.testLogPath + "TypesInQueryTests.txt");
59 | TypesInQueryTests.Run(context, matchPattern);
60 |
61 | TestLog.LogInit(Config.testLogPath + "SerializationTests.txt");
62 | SerializationTests.Run(context, matchPattern);
63 |
64 | TestLog.LogInit(Config.testLogPath + "MiscBugFixTests.txt");
65 | MiscBugFixTests.Run(context, matchPattern);
66 | */
67 |
68 | }
69 |
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/DryadLinqTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("DryadLinqTests")]
28 | [assembly: AssemblyDescription("")]
29 | [assembly: AssemblyConfiguration("")]
30 | [assembly: AssemblyCompany("")]
31 | [assembly: AssemblyProduct("Dryad")]
32 | [assembly: AssemblyCopyright("Copyright © Microsoft Corporation. All rights reserved.")]
33 | [assembly: AssemblyTrademark("")]
34 | [assembly: AssemblyCulture("")]
35 |
36 | // Setting ComVisible to false makes the types in this assembly not visible
37 | // to COM components. If you need to access a type in this assembly from
38 | // COM, set the ComVisible attribute to true on that type.
39 | [assembly: ComVisible(false)]
40 |
41 | // The following GUID is for the ID of the typelib if this project is exposed to COM
42 | [assembly: Guid("49b725be-1187-4056-9890-7a0cb4c064a4")]
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("0.1.5.0")]
55 | [assembly: AssemblyFileVersion("0.1.5.0")]
56 |
--------------------------------------------------------------------------------
/DryadLinqTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/channel/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/channel/src/managedchannel.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "channelreader.h"
24 | #include "channelwriter.h"
25 | #include "concreterchannelhelpers.h"
26 |
27 | #pragma managed
28 |
29 | class ManagedChannelFactory
30 | {
31 | public:
32 | void Initialize();
33 | static RChannelBufferReader* OpenReader(const char* uri, int numberOfReaders, LPDWORD localChannels,
34 | RChannelOpenThrottler* throttler);
35 | static bool RecognizesReaderUri(const char* uri);
36 |
37 | static RChannelBufferWriter* OpenWriter(const char* uri, int numberOfWriters, bool* pBreakOnRecordBoundaries,
38 | RChannelOpenThrottler* throttler);
39 | static bool RecognizesWriterUri(const char* uri);
40 | };
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/DrCommon.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #pragma warning (disable: 4100) // unreferenced formal parameter
24 | #pragma warning (disable: 4995) // deprecated function
25 |
26 | #include "DrTypes.h"
27 | #include "Dryad.h"
28 | #include "DrErrorDef.h"
29 | #include "DrLogging.h"
30 | #include "DrFunctions.h"
31 | #include "DrHash.h"
32 | #include "MSMutex.h"
33 | #include "DrGuid.h"
34 | #include "DrStringUtil.h"
35 | #include "DrExitCodesDef.h"
36 | #include "DrRefCounter.h"
37 | #include "DrMemory.h"
38 | #include "DrMemoryStream.h"
39 | #include "DrCriticalSection.h"
40 | #include "DrHeap.h"
41 | #include "DrThread.h"
42 | #include "propertyids.h"
43 | #include "DrPropertiesDef.h"
44 | #include "DrMemoryStream.h"
45 | #include "DrNodeAddress.h"
46 | #include "DrTagsDef.h"
47 | #include "DrPropertyDumper.h"
48 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/DrExitCodesDef.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | typedef UInt32 DrExitCode;
24 |
25 | void DrInitExitCodeTable();
26 | DrError DrAddExitCodeDescription(DrExitCode code, const char *pszDescription);
27 | DrStr& DrAppendExitCodeDescription(DrStr& strOut, DrExitCode code);
28 | DrStr& DrGetExitCodeDescription(DrStr& strOut, DrExitCode code);
29 |
30 | class DrExitCodeString : public DrStr128
31 | {
32 | public:
33 | DrExitCodeString(DrExitCode code)
34 | {
35 | DrGetExitCodeDescription(*this, code);
36 | }
37 | };
38 |
39 | // This macro can be used to obtain a temporary "const char *" error description for an exit code. It can be used
40 | // as the parameter to a method call; the pointer will become invalid after the function returns
41 | #define DREXITCODESTRING(code) (DrExitCodeString(code).GetString())
42 | #define DREXITCODEWSTRING(code) (DRUTF8TOWSTRING(DREXITCODESTRING(code)))
43 |
44 |
45 |
46 | #define DEFINE_DREXITCODE_NO_DESC(name, value) DEFINE_DREXITCODE(name, (DrExitCode)(value), #name)
47 | #define DECLARE_DREXITCODE_NO_DESC(valname) DECLARE_DREXITCODE(valname, #valname)
48 |
49 | #ifdef DEFINE_DREXITCODE
50 | #undef DEFINE_DREXITCODE
51 | #endif
52 | #ifdef DECLARE_DREXITCODE
53 | #undef DECLARE_DREXITCODE
54 | #endif
55 | #define DEFINE_DREXITCODE(name, value, description) const DrExitCode name = (DrExitCode)(value);
56 | #define DECLARE_DREXITCODE(valname, description)
57 |
58 | #include "DrExitCodes.h"
59 |
60 | #undef DEFINE_DREXITCODE
61 | #undef DECLARE_DREXITCODE
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/DrPropertiesDef.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | class DrPropertyDumper;
24 |
25 | #ifdef DECLARE_DRPROPERTYTYPE
26 | #undef DECLARE_DRPROPERTYTYPE
27 | #endif
28 |
29 | #define DECLARE_DRPROPERTYTYPE(type) \
30 | extern DrError DrPropertyToText_##type(DrPropertyDumper *pDumper, UInt16 enumId, const char *propertyName);
31 |
32 | #include "DrPropertyType.h"
33 |
34 | #undef DECLARE_DRPROPERTYTYPE
35 |
36 |
37 | #ifdef DEFINE_DRPROPERTY
38 | #undef DEFINE_DRPROPERTY
39 | #endif
40 |
41 | #define DEFINE_DRPROPERTY(var, value, type, propertyName) \
42 | static const UInt16 var = value;
43 |
44 | #include "DrProperties.h"
45 |
46 | #undef DEFINE_DRPROPERTY
47 |
48 |
49 | // This is a special value for an offset meaning unknown
50 | const UInt64 DrStreamOffset_Unknown = 0xFFFFFFFFFFFFFFFF;
51 |
52 | // This is a special value for an extent offset meaning unknown
53 | // Note that -1 is used to mean an invalid offset
54 | const UInt64 DrExtentOffset_Unknown = (UInt64 ) -2; //$TODO(DanielD) - for consistency (and logging, etc - see SamMck) swap values to have DrExtentOffset_Unknown==-1
55 | const UInt64 DrExtentOffset_Invalid = (UInt64 ) -1;
56 |
57 | const UInt64 DrExtentLength_Invalid = (UInt64) -1;
58 |
59 | //Flags for Prop_Dryad_PublishedCrc64
60 | const UInt64 DrExtentCrc64_Suspect = (UInt64)-1;
61 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/DrPropertyType.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | // This file must consist only of DECLARE_DRPROPERTYTYPE statements
22 |
23 | DECLARE_DRPROPERTYTYPE(Unknown)
24 | DECLARE_DRPROPERTYTYPE(Boolean)
25 | DECLARE_DRPROPERTYTYPE(Int16)
26 | DECLARE_DRPROPERTYTYPE(Int32)
27 | DECLARE_DRPROPERTYTYPE(Int64)
28 | DECLARE_DRPROPERTYTYPE(UInt16)
29 | DECLARE_DRPROPERTYTYPE(UInt32)
30 | DECLARE_DRPROPERTYTYPE(UInt64)
31 | DECLARE_DRPROPERTYTYPE(Double)
32 | DECLARE_DRPROPERTYTYPE(HexUInt16)
33 | DECLARE_DRPROPERTYTYPE(HexUInt32)
34 | DECLARE_DRPROPERTYTYPE(HexUInt64)
35 | DECLARE_DRPROPERTYTYPE(String)
36 | DECLARE_DRPROPERTYTYPE(Guid)
37 | DECLARE_DRPROPERTYTYPE(TimeStamp)
38 | DECLARE_DRPROPERTYTYPE(TimeInterval)
39 | DECLARE_DRPROPERTYTYPE(BeginTag)
40 | DECLARE_DRPROPERTYTYPE(EndTag)
41 | DECLARE_DRPROPERTYTYPE(DrError)
42 | DECLARE_DRPROPERTYTYPE(DrExitCode)
43 | DECLARE_DRPROPERTYTYPE(Blob)
44 | DECLARE_DRPROPERTYTYPE(Payload)
45 | DECLARE_DRPROPERTYTYPE(EnvironmentBlock)
46 | DECLARE_DRPROPERTYTYPE(PropertyList)
47 | DECLARE_DRPROPERTYTYPE(TagIdValue)
48 |
49 | DECLARE_DRPROPERTYTYPE(AppendExtentOptions)
50 | DECLARE_DRPROPERTYTYPE(AppendBlockOptions)
51 | DECLARE_DRPROPERTYTYPE(SyncOptions)
52 | DECLARE_DRPROPERTYTYPE(SyncDirectiveOptions)
53 | DECLARE_DRPROPERTYTYPE(ReadExtentOptions)
54 | DECLARE_DRPROPERTYTYPE(AppendStreamOptions)
55 | DECLARE_DRPROPERTYTYPE(EnumDirectoryOptions)
56 | DECLARE_DRPROPERTYTYPE(EnInfoBits)
57 | DECLARE_DRPROPERTYTYPE(UpdateExtentMetadataOptions)
58 | DECLARE_DRPROPERTYTYPE(StreamInfoBits)
59 | DECLARE_DRPROPERTYTYPE(StreamCapabilityBits)
60 | DECLARE_DRPROPERTYTYPE(ExtentInfoBits)
61 | DECLARE_DRPROPERTYTYPE(ExtentInstanceInfoBits)
62 | DECLARE_DRPROPERTYTYPE(FailureInjectionOptions)
63 |
64 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/DrTagsDef.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #ifdef DEFINE_DRTAG
24 | #undef DEFINE_DRTAG
25 | #endif
26 |
27 | #define DEFINE_DRTAG(var, value, tagName) \
28 | static const UInt16 var = value;
29 |
30 | #include "DrTags.h"
31 |
32 | #undef DEFINE_DRTAG
33 |
34 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/DryadTagsDef.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #ifdef DEFINE_DRYADTAG
24 | #undef DEFINE_DRYADTAG
25 | #endif
26 |
27 | #define DEFINE_DRYADTAG(var, value, tagName, tagType) \
28 | static const UInt16 var = value;
29 |
30 | #include "dryadtags.h"
31 |
32 | #undef DEFINE_DRYADTAG
33 |
34 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/PropertyIds.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "basic_types.h"
24 |
25 | // property type flag
26 | const UInt16 PropTypeMask = 0xc000;
27 |
28 | // PropType_Atom is a leaf property which is an element of a list or a
29 | // set. There may be nested properties within the leaf.
30 | const UInt16 PropType_Atom = 0x0000;
31 |
32 | // length type flag
33 | const UInt16 PropLengthMask = 0x2000;
34 |
35 | // A property with PropLength_Short has a 1-byte length field
36 | const UInt16 PropLength_Short = 0x0000;
37 | // A property with PropLength_Long has a 4-byte length field
38 | const UInt16 PropLength_Long = 0x2000;
39 |
40 | // mask for the remaining 13-bit namespace
41 |
42 | const UInt16 PropValueMask = 0x1fff;
43 |
44 | #define PROP_SHORTATOM(x_) ((x_) | PropType_Atom | PropLength_Short)
45 | #define PROP_LONGATOM(x_) ((x_) | PropType_Atom | PropLength_Long)
46 |
47 | // Propries for Dryad
48 | const UInt16 Prop_Stream_BeginTag = PROP_SHORTATOM(0x1200);
49 | const UInt16 Prop_Stream_EndTag = PROP_SHORTATOM(0x1201);
50 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/fingerprint.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "basic_types.h"
24 | #include "ms_fprint.h"
25 |
26 | class FingerPrint64
27 | {
28 | public:
29 | static FingerPrint64* GetInstance();
30 |
31 | UInt64 GetFingerPrint(
32 | const void* data,
33 | const size_t length
34 | );
35 |
36 | class FingerPrint64Init
37 | {
38 | public:
39 | FingerPrint64Init();
40 | ~FingerPrint64Init();
41 | private:
42 | static UInt64 count;
43 | };
44 | static void Init();
45 | static void Dispose();
46 | FingerPrint64(UInt64 poly);
47 | FingerPrint64();
48 | ~FingerPrint64();
49 | private:
50 | ms_fprint_data_t fp;
51 | static FingerPrint64* instance;
52 | };
53 |
54 | static FingerPrint64::FingerPrint64Init fpInit;
55 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/include/ms_fprint.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | /* (c) Microsoft Corporation. All rights reserved. */
22 |
23 | #if !defined(_MS_FPRINT_H_)
24 | #define _MS_FPRINT_H_
25 |
26 | #if defined(__GNUC__)
27 | typedef unsigned long long ms_fprint_t;
28 | #endif
29 |
30 | #if defined(_MSC_VER)
31 | typedef unsigned __int64 ms_fprint_t;
32 | #pragma warning(disable:4127)
33 | #include
34 | #endif
35 |
36 | typedef struct ms_fprint_data_s *ms_fprint_data_t;
37 | /* an opaque type used to keep the data structures need to compute
38 | fingerprints. */
39 |
40 | ms_fprint_data_t ms_fprint_new ();
41 | /* Computes the tables needed for fingerprint manipulations. */
42 |
43 | ms_fprint_data_t ms_fprint_new (ms_fprint_t poly);
44 | /* Computes the tables needed for fingerprint manipulations. */
45 |
46 | ms_fprint_t ms_fprint_of (ms_fprint_data_t fp,
47 | void *data, size_t len);
48 | /* if fp was generated with polynomial P, and bytes
49 | "data[0, ..., len-1]" contain string B,
50 | return the fingerprint under P of the concatenation of B.
51 | Strings are treated as polynomials. The low-order bit in the first
52 | byte is the highest degree coefficient in the polynomial.*/
53 |
54 | void ms_fprint_destroy (ms_fprint_data_t fp);
55 | /* discard the data associated with "fp" */
56 |
57 | #endif
58 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/src/DrExecution.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #include "DrExecution.h"
22 |
23 | DrExecutionEnvironment *g_pDryadExecution = NULL;
24 |
25 | //JC
26 | #if 0
27 | //JC#define SECURITY_WIN32
28 | //JC#define SEC_SUCCESS(Status) ((Status) >= 0)
29 | //JC#include
30 |
31 |
32 | DrError DrInitExecution()
33 | {
34 | LogAssert(g_pDrExecution == NULL);
35 | g_pDrExecution = new DrExecutionEnvironment();
36 | LogAssert(g_pDrExecution != NULL);
37 | DrError err = g_pDrExecution->Initialize();
38 | if (err != DrError_OK) {
39 | delete g_pDrExecution;
40 | g_pDrExecution = NULL;
41 | }
42 | return err;
43 | }
44 |
45 | DrError DrExecutionEnvironment::Initialize()
46 | {
47 | //JC return DrInitPipeManager();
48 | return DrError_OK;
49 | }
50 | #endif
51 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/src/DrRefCounter.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #include "DrCommon.h"
22 | #include
23 |
24 | #pragma unmanaged
25 |
26 | static volatile LONGLONG g_DrRefUniqueObjectCounter = 0;
27 |
28 |
29 | #if defined(_AMD64_)
30 |
31 | UInt64 GetUniqueObjectID()
32 | {
33 | LONGLONG value = ::InterlockedIncrement64(&g_DrRefUniqueObjectCounter);
34 | return (UInt64) value;
35 | }
36 |
37 | #else
38 |
39 | // We don't use non-x64 builds, but for completeness sake we will generate a
40 | // a 32 bit version. The downside is that unique object IDs would wrap around at 4 Billion if this build were used,
41 | // but even that isn't a problem because we'll never have so many active object at a given time.
42 | UInt64 GetUniqueObjectID()
43 | {
44 | int value = ::InterlockedIncrement((volatile LONG*) &g_DrRefUniqueObjectCounter);
45 | return (UInt64) value;
46 | }
47 |
48 | #endif
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/classlib/src/fingerprint.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #include "fingerprint.h"
22 |
23 |
24 | #pragma unmanaged
25 |
26 | UInt64 FingerPrint64::FingerPrint64Init::count;
27 | FingerPrint64* FingerPrint64::instance;
28 |
29 | FingerPrint64::FingerPrint64Init::FingerPrint64Init()
30 | {
31 | if (0 == count)
32 | {
33 | FingerPrint64::Init();
34 | }
35 | ++count;
36 | }
37 |
38 | FingerPrint64::FingerPrint64Init::~FingerPrint64Init()
39 | {
40 | //JC assert(count > 0);
41 | --count;
42 | if (0 == count)
43 | {
44 | FingerPrint64::Dispose();
45 | }
46 | }
47 |
48 | void FingerPrint64::Init()
49 | {
50 | FingerPrint64::instance = new FingerPrint64();
51 | }
52 |
53 | void FingerPrint64::Dispose()
54 | {
55 | delete FingerPrint64::instance;
56 | FingerPrint64::instance = 0;
57 | }
58 |
59 | FingerPrint64* FingerPrint64::GetInstance()
60 | {
61 | return FingerPrint64::instance;
62 | }
63 |
64 | UInt64 FingerPrint64::GetFingerPrint(const void *data, const size_t length)
65 | {
66 | return ms_fprint_of(this->fp, (void*) data, (size_t) length);
67 | }
68 |
69 | FingerPrint64::FingerPrint64(UInt64 poly)
70 | {
71 | this->fp = ::ms_fprint_new(poly);
72 | }
73 |
74 | FingerPrint64::FingerPrint64(void)
75 | {
76 | this->fp = ::ms_fprint_new();
77 | }
78 |
79 | FingerPrint64::~FingerPrint64(void)
80 | {
81 | ::ms_fprint_destroy(this->fp);
82 | }
83 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/DrString.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | #pragma managed
26 |
27 | #include
28 |
29 | class DrString
30 | {
31 | public:
32 | DrString(System::String^ s)
33 | {
34 | /* cache a copy of the UTF8 char* representation */
35 | pin_ptr c = PtrToStringChars(s);
36 |
37 | int newSize = ::WideCharToMultiByte(CP_UTF8, 0, c, -1, NULL, 0, NULL, NULL);
38 | char* chars = new char[newSize];
39 |
40 | int convertedChars = ::WideCharToMultiByte(CP_UTF8, 0, c, -1, chars, newSize, NULL, NULL);
41 | if (convertedChars == 0)
42 | {
43 | delete[] chars;
44 | DrLogA("Failed to convert %S to UTF8: %d", c, GetLastError());
45 | }
46 |
47 | m_chars = chars;
48 | }
49 |
50 | ~DrString()
51 | {
52 | delete [] m_chars;
53 | }
54 |
55 | const char* GetChars()
56 | {
57 | return m_chars;
58 | }
59 |
60 | private:
61 | const char* m_chars;
62 | };
63 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/cosmospropertyblock.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | class DrPnSetProcessPropertyRequest;
26 | class DrPnGetProcessPropertyResponse;
27 | class DrProcessPropertyInfo;
28 |
29 | class DryadDryadPnProcessPropertyRequest :
30 | public DryadPnProcessPropertyRequest
31 | {
32 | public:
33 | DryadDryadPnProcessPropertyRequest(DrPnSetProcessPropertyRequest*
34 | request);
35 |
36 | void SetPropertyLabel(const char* label, const char* controlLabel);
37 | void SetPropertyString(const char* string);
38 | DrMemoryBuffer* GetPropertyBlock();
39 |
40 | DrPnSetProcessPropertyRequest* GetMessage();
41 |
42 | private:
43 | DrRef m_message;
44 | };
45 |
46 | class DryadDryadPnProcessPropertyResponse :
47 | public DryadPnProcessPropertyResponse
48 | {
49 | public:
50 | DryadDryadPnProcessPropertyResponse(DrPnGetProcessPropertyResponse*
51 | response);
52 |
53 | void RetrievePropertyLabel(const char* label);
54 | DrMemoryBuffer* GetPropertyBlock();
55 |
56 | private:
57 | DrPnGetProcessPropertyResponse* m_message;
58 | DrProcessPropertyInfo* m_info;
59 | };
60 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/cosmosstreampropertyupdater.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | class DryadStreamPropertyUpdater : public StreamPropertyUpdater
26 | {
27 | private:
28 | void SendUpdate(StreamHolder* holder);
29 | void SendWdUpdate(ProcessHolder* holder);
30 | };
31 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadcosmosresources.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | class DryadDryadProcessIdentifier : public DryadProcessIdentifier
26 | {
27 | public:
28 | DryadDryadProcessIdentifier(DrGuid* guid);
29 |
30 | DrGuid* GetGuid();
31 | const char* GetGuidString();
32 |
33 | void SetWorkingDirectory(const char* workingDirectory);
34 | void MakeURIForRelativeFile(DrStr* dst,
35 | const char* baseDirectory,
36 | const char* relativeFileName);
37 |
38 | private:
39 | DrGuid m_guid;
40 | DrStr32 m_guidString;
41 | DrStr128 m_workingDirectory;
42 | };
43 |
44 | class DryadDryadMachineIdentifier : public DryadMachineIdentifier
45 | {
46 | public:
47 | DryadDryadMachineIdentifier(DrServiceDescriptor* desc);
48 |
49 | DrServiceDescriptor* GetServiceDescriptor();
50 |
51 | private:
52 | DrServiceDescriptor m_serviceDescriptor;
53 | };
54 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryaderrordef.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | #define FACILITY_DRYAD 778
26 | #define DRYAD_ERROR(n) ((HRESULT)(0x80000000 + (FACILITY_DRYAD << 16) + n))
27 |
28 | #ifdef DEFINE_DRYAD_ERROR
29 | #undef DEFINE_DRYAD_ERROR
30 | #endif
31 |
32 | #define DEFINE_DRYAD_ERROR(name, number, description) static const DrError name = number;
33 | #include "DryadError.h"
34 |
35 | #undef DEFINE_DRYAD_ERROR
36 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadeventcache.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | class DryadHandleListEntry
26 | {
27 | public:
28 | DryadHandleListEntry(HANDLE handle);
29 | HANDLE GetHandle();
30 |
31 | private:
32 | HANDLE m_handle;
33 | DrBListEntry m_listPtr;
34 | friend class DryadBList;
35 | };
36 |
37 | class DryadEventCache
38 | {
39 | public:
40 | DryadEventCache();
41 | ~DryadEventCache();
42 |
43 | DryadHandleListEntry* GetEvent(bool reset);
44 | void ReturnEvent(DryadHandleListEntry* event);
45 |
46 | private:
47 | typedef DryadBList HandleList;
48 |
49 | HandleList m_eventCache;
50 | };
51 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadlisthelper.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 |
26 | template< class _T > class DryadBList : public DrBList
27 | {
28 | public:
29 | typedef _T EntryType;
30 |
31 | static EntryType* CastOut(DrBListEntry* item)
32 | {
33 | return (item == NULL) ? NULL :
34 | (DR_GET_CONTAINER(EntryType, item, m_listPtr));
35 | }
36 |
37 | static DrBListEntry* CastIn(EntryType* item)
38 | {
39 | return &(item->m_listPtr);
40 | }
41 |
42 | EntryType* GetNextTyped(EntryType* item)
43 | {
44 | return CastOut(GetNext(CastIn(item)));
45 | }
46 | };
47 |
48 | template< class _T, class _B > class DryadBListDerived : public DrBList
49 | {
50 | public:
51 | typedef _T EntryType;
52 | typedef _B BaseType;
53 | typedef DryadBList< BaseType > BaseListType;
54 |
55 | static EntryType* CastOut(DrBListEntry* item)
56 | {
57 | return (EntryType *) BaseListType::CastOut(item);
58 | }
59 |
60 | static DrBListEntry* CastIn(EntryType* item)
61 | {
62 | return BaseListType::CastIn(item);
63 | }
64 |
65 | EntryType* GetNextTyped(EntryType* item)
66 | {
67 | return CastOut(GetNext(CastIn(item)));
68 | }
69 | };
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadmetadatatag.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | class DryadMetaData;
26 | class DryadMetaDataConst;
27 | class DrMemoryWriter;
28 |
29 | class DryadMTag;
30 | typedef DrRef DryadMTagRef;
31 |
32 | class DryadMTag : public DrRefCounter
33 | {
34 | public:
35 | UInt16 GetTagValue();
36 | UInt16 GetType();
37 |
38 | virtual DrError Serialize(DrMemoryWriter* writer) = 0;
39 |
40 | /* the default implementation is for immutable tags and simply
41 | increments the reference count and returns self */
42 | virtual void Clone(DryadMTagRef* dstTag);
43 |
44 | protected:
45 | DryadMTag(UInt16 tagValue, UInt16 type);
46 | virtual ~DryadMTag();
47 |
48 | private:
49 | UInt16 m_tag;
50 | UInt16 m_type;
51 | };
52 |
53 | enum DrPropertyTagEnum {
54 |
55 | #ifdef DECLARE_DRPROPERTYTYPE
56 | #undef DECLARE_DRPROPERTYTYPE
57 | #endif
58 |
59 | #define DECLARE_DRPROPERTYTYPE(type) DrPropertyTagType_##type,
60 |
61 | #include "DrPropertyType.h"
62 |
63 | #undef DECLARE_DRPROPERTYTYPE
64 | };
65 |
66 | enum DryadPropertyTagEnum {
67 |
68 | DryadPropertyTagType_MetaData = 0x1000,
69 | DryadPropertyTagType_InputChannelDescription,
70 | DryadPropertyTagType_OutputChannelDescription,
71 | DryadPropertyTagType_VertexProcessStatus,
72 | DryadPropertyTagType_VertexStatus,
73 | DryadPropertyTagType_VertexCommandBlock,
74 |
75 | #ifdef DECLARE_DRYADPROPERTYTYPE
76 | #undef DECLARE_DRYADPROPERTYTYPE
77 | #endif
78 |
79 | #define DECLARE_DRYADPROPERTYTYPE(type) DryadPropertyTagType_##type,
80 |
81 | #include "DryadPropertyType.h"
82 |
83 | #undef DECLARE_DRYADPROPERTYTYPE
84 | };
85 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadopaqueresources.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | /* this is an opaque class that identifies a process independent of
26 | cluster type */
27 | class DryadProcessIdentifier : public DrRefCounter
28 | {
29 | public:
30 | virtual ~DryadProcessIdentifier();
31 |
32 | virtual DrGuid* GetGuid() = 0;
33 | virtual const char* GetGuidString() = 0;
34 |
35 | virtual void MakeURIForRelativeFile(DrStr* dst,
36 | const char* baseDirectory,
37 | const char* relativeFileName) = 0;
38 | };
39 |
40 | /* this is an opaque class that identifies a machine independent of
41 | cluster type */
42 | class DryadMachineIdentifier : public DrRefCounter
43 | {
44 | public:
45 | virtual ~DryadMachineIdentifier();
46 | };
47 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadpropertiesdef.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | class DrPropertyDumper;
24 |
25 | #ifdef DECLARE_DRYADPROPERTYTYPE
26 | #undef DECLARE_DRYADPROPERTYTYPE
27 | #endif
28 |
29 | #define DECLARE_DRYADPROPERTYTYPE(type) \
30 | extern DrError DryadPropertyToText_##type(DrPropertyDumper *pDumper, UInt16 enumId, const char *propertyName);
31 |
32 | #include "dryadpropertytype.h"
33 |
34 | #undef DECLARE_DRYADPROPERTYTYPE
35 |
36 | #ifdef DEFINE_DRPROPERTY
37 | #undef DEFINE_DRPROPERTY
38 | #endif
39 |
40 | #ifdef DEFINE_DRYADPROPERTY
41 | #undef DEFINE_DRYADPROPERTY
42 | #endif
43 |
44 | #define DEFINE_DRPROPERTY(var, value, type, propertyName) \
45 | static const UInt16 var = value;
46 |
47 | #define DEFINE_DRYADPROPERTY(var, value, type, propertyName) \
48 | static const UInt16 var = value;
49 |
50 | #include "dryadproperties.h"
51 |
52 | #undef DEFINE_DRPROPERTY
53 | #undef DEFINE_DRYADPROPERTY
54 |
55 |
56 |
57 | // Options for VertexCommand in a DVertexCommand message
58 | enum DVertexCommand {
59 | DVertexCommand_Start = 0,
60 | DVertexCommand_ReOpenChannels,
61 | DVertexCommand_Terminate,
62 | DVertexCommand_Max
63 | };
64 | extern const char* g_dVertexCommandText[DVertexCommand_Max];
65 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadpropertydumper.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | extern void DryadInitPropertyTable();
24 | extern void DryadInitTagTable();
25 | extern void DryadInitErrorTable();
26 |
27 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadpropertytype.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | // This file must consist only of DECLARE_DRYADPROPERTYTYPE statements
22 |
23 | DECLARE_DRYADPROPERTYTYPE(Void)
24 |
25 | DECLARE_DRYADPROPERTYTYPE(VertexCommand)
26 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadstandaloneini.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | DrError DryadInitialize(int argc, char* argv[], int* pNOpts);
26 | DrError DryadShutdown();
27 |
28 | class DryadNativePort;
29 |
30 | extern DryadNativePort* g_dryadNativePort;
31 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/dryadtagsdef.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #ifdef DEFINE_DRYADTAG
24 | #undef DEFINE_DRYADTAG
25 | #endif
26 |
27 | #define DEFINE_DRYADTAG(var, value, tagName, tagType) \
28 | static const UInt16 var = value;
29 |
30 | #include "dryadtags.h"
31 |
32 | #undef DEFINE_DRYADTAG
33 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/errorreporter.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | class DVErrorReporter
26 | {
27 | public:
28 | DVErrorReporter();
29 |
30 | bool NoError();
31 | DrError GetErrorCode();
32 | DryadMetaData* GetErrorMetaData();
33 |
34 | void ReportError(DrError errorStatus);
35 | void ReportError(const char* errorFormat, ...);
36 | void ReportError(DrError errorStatus,
37 | const char* errorFormat, ...);
38 | void ReportError(DrError errorStatus, DryadMetaData* metaData);
39 |
40 | void InterruptProcessing();
41 |
42 | static DrError GetFormattedErrorFromMetaData(DryadMetaData* metaData, DrStr* pFormattedOutput);
43 |
44 | private:
45 | void ReportFormattedErrorInternal(DrError errorStatus,
46 | const char *formatString,
47 | va_list args);
48 |
49 | DrError m_errorCode;
50 | DryadMetaDataRef m_metaData;
51 | };
52 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/httppropertyblock.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | class DryadHttpPnProcessPropertyRequest : public DryadPnProcessPropertyRequest
26 | {
27 | public:;
28 | DryadHttpPnProcessPropertyRequest();
29 |
30 | void SetPropertyLabel(const char* label, const char* controlLabel);
31 | void SetPropertyString(const char* string);
32 | DrMemoryBuffer* GetPropertyBlock();
33 |
34 | protected:
35 | DrStr64 m_label;
36 | DrStr64 m_string;
37 | DrRef m_block;
38 | };
39 |
40 | class DryadHttpPnProcessPropertyResponse : public DryadPnProcessPropertyResponse
41 | {
42 | public:
43 | DryadHttpPnProcessPropertyResponse(UInt32 length, const unsigned char* data);
44 |
45 | void RetrievePropertyLabel(const char* label);
46 | DrMemoryBuffer* GetPropertyBlock();
47 |
48 | private:
49 |
50 | DrRef m_block;
51 | };
52 |
53 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/include/workqueue.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | class WorkQueue;
26 |
27 | class WorkRequest
28 | {
29 | public:
30 | virtual ~WorkRequest();
31 | virtual void Process() = 0;
32 | virtual bool ShouldAbort() = 0;
33 |
34 | private:
35 | DrBListEntry m_listPtr;
36 | friend class DryadBList;
37 | };
38 |
39 | typedef DryadBList WorkRequestList;
40 |
41 | class WorkQueue {
42 | public:
43 | WorkQueue(DWORD numWorkerThreads,
44 | DWORD numConcurrentThreads);
45 | ~WorkQueue();
46 |
47 | void Start();
48 | bool EnQueue(WorkRequest* request);
49 |
50 | void Clean();
51 | void Stop();
52 |
53 | private:
54 | enum WorkQueueState {
55 | WQS_Stopped,
56 | WQS_Running,
57 | WQS_Stopping
58 | };
59 |
60 | static unsigned __stdcall ThreadFunc(void* arg);
61 |
62 | WorkRequestList m_list; /* list of WorkRequest items */
63 |
64 | WorkQueueState m_state;
65 |
66 | DWORD m_numWorkerThreads;
67 | DWORD m_numConcurrentThreads;
68 | HANDLE m_completionPort;
69 | HANDLE* m_threadHandle;
70 | DWORD m_numQueuedWakeUps;
71 |
72 | CRITSEC m_baseCS;
73 | };
74 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/src/dryadeventcache.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #include "dryadeventcache.h"
22 |
23 |
24 | #pragma unmanaged
25 |
26 | DryadHandleListEntry::DryadHandleListEntry(HANDLE handle)
27 | {
28 | m_handle = handle;
29 | }
30 |
31 | HANDLE DryadHandleListEntry::GetHandle()
32 | {
33 | return m_handle;
34 | }
35 |
36 | DryadEventCache::DryadEventCache()
37 | {
38 | }
39 |
40 | DryadEventCache::~DryadEventCache()
41 | {
42 | BOOL bRet;
43 | DrBListEntry* listEntry = m_eventCache.GetHead();
44 | while (listEntry != NULL)
45 | {
46 | DryadHandleListEntry* h = m_eventCache.CastOut(listEntry);
47 | listEntry = m_eventCache.GetNext(listEntry);
48 | m_eventCache.Remove(m_eventCache.CastIn(h));
49 | bRet = ::CloseHandle(h->GetHandle());
50 | LogAssert(bRet != 0);
51 | delete h;
52 | }
53 | }
54 |
55 | DryadHandleListEntry* DryadEventCache::GetEvent(bool reset)
56 | {
57 | DryadHandleListEntry* event;
58 |
59 | if (m_eventCache.IsEmpty())
60 | {
61 | HANDLE h = ::CreateEvent(NULL, TRUE, FALSE, NULL);
62 | LogAssert(h != NULL);
63 | event = new DryadHandleListEntry(h);
64 | }
65 | else
66 | {
67 | event = m_eventCache.CastOut(m_eventCache.RemoveHead());
68 | if (reset)
69 | {
70 | BOOL bRet = ::ResetEvent(event->GetHandle());
71 | LogAssert(bRet != 0);
72 | }
73 | }
74 |
75 | return event;
76 | }
77 |
78 | void DryadEventCache::ReturnEvent(DryadHandleListEntry* event)
79 | {
80 | m_eventCache.InsertAsHead(m_eventCache.CastIn(event));
81 | }
82 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/src/dryadmetadatatag.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #include
22 | #include
23 |
24 | #include
25 |
26 |
27 | #pragma unmanaged
28 |
29 | DryadMTag::DryadMTag(UInt16 tagValue, UInt16 type)
30 | {
31 | m_tag = tagValue;
32 | m_type = type;
33 | }
34 |
35 | DryadMTag::~DryadMTag()
36 | {
37 | }
38 |
39 | UInt16 DryadMTag::GetTagValue()
40 | {
41 | return m_tag;
42 | }
43 |
44 | UInt16 DryadMTag::GetType()
45 | {
46 | return m_type;
47 | }
48 |
49 | void DryadMTag::Clone(DryadMTagRef* dstTag)
50 | {
51 | *dstTag = this;
52 | }
53 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/src/dryadopaqueresources.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #include
22 |
23 |
24 | #pragma unmanaged
25 |
26 | DryadProcessIdentifier::~DryadProcessIdentifier()
27 | {
28 | }
29 |
30 | DryadMachineIdentifier::~DryadMachineIdentifier()
31 | {
32 | }
33 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/common/src/httppropertyblock.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #include
22 |
23 |
24 | DryadHttpPnProcessPropertyRequest::DryadHttpPnProcessPropertyRequest()
25 | {
26 | m_block.Attach(new DrSimpleHeapBuffer());
27 | }
28 |
29 | void DryadHttpPnProcessPropertyRequest::
30 | SetPropertyLabel(const char* label, const char* /*controlLabel*/)
31 | {
32 | m_label.Set(label);
33 | }
34 |
35 | void DryadHttpPnProcessPropertyRequest::
36 | SetPropertyString(const char* string)
37 | {
38 | m_string.Set(string);
39 | }
40 |
41 | DrMemoryBuffer*
42 | DryadHttpPnProcessPropertyRequest::GetPropertyBlock()
43 | {
44 | return m_block;
45 | }
46 |
47 | DryadHttpPnProcessPropertyResponse::
48 | DryadHttpPnProcessPropertyResponse(UInt32 length, const unsigned char* data)
49 | {
50 | m_block.Attach(new DrFixedMemoryBuffer());
51 | m_block->Init(data, length, length);
52 | }
53 |
54 | DrMemoryBuffer* DryadHttpPnProcessPropertyResponse::GetPropertyBlock()
55 | {
56 | return m_block;
57 | }
58 |
59 | void DryadHttpPnProcessPropertyResponse::RetrievePropertyLabel(const char* label)
60 | {
61 | }
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/dprocess/include/dvertexmain.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 |
26 | class DryadVertexFactoryBase;
27 |
28 | // This is the default implementation of main() for a vertex. If the application does not
29 | // implement main(), this function gets called by a stub main().
30 | extern int DryadVertexMain(int argc, char* argv[],
31 | DryadVertexFactoryBase* factory);
32 | extern int DryadJobManagerMain(int argc, char* argv[]);
33 | extern int DryadJointMain(int argc, char* argv[]);
34 |
35 | /* if an app wants to use DVERTEXMAIN instead of DVERTEXJOINTMAIN it
36 | needs to implement this call to include registration of all its
37 | static vertex factories. If it returns NULL then the vertex to run
38 | will be determined by the command line. Otherwise the vertex will
39 | be the one generated by the factory that is returned. */
40 | DryadVertexFactoryBase* DryadRegisterFactories();
41 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/dprocess/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/dprocess/src/dvertexcmdlinecontrol.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 | class DVertexCmdLineController : public DryadVertexController
29 | {
30 | public:
31 | UInt32 Run(int argc, char* argv[],
32 | DryadVertexFactoryBase* factory,
33 | bool useExplicitCmdLine);
34 | void AssimilateNewStatus(DVertexProcessStatus* status,
35 | bool sendUpdate, bool notifyWaiters);
36 |
37 | private:
38 | void GetURI(DrStr* dst, const char* channel);
39 | int GetChannelDescriptions(int argc, char* argv[],
40 | DVertexProcessStatus* initialState,
41 | bool isInput);
42 | int GetChannelOverride(int argc, char* argv[],
43 | DVertexProcessStatus* initialState,
44 | bool isInput);
45 | int GetTextOverride(int argc, char* argv[],
46 | DVertexCommandBlock* startCommand);
47 | int RestoreDumpedStartCommand(int argc, char* argv[],
48 | DVertexCommandBlock* startCommand);
49 | DrError ParseImplicitCmdLine(int argc, char* argv[],
50 | DVertexCommandBlock* startCommand);
51 | void ParseExplicitCmdLine(int argc, char* argv[],
52 | DVertexCommandBlock* startCommand);
53 | };
54 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/dprocess/src/dvertexhttppncontrol.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "dvertexpncontrol.h"
24 |
25 | #pragma managed
26 |
27 | //
28 | // Wrapper for PN controller and environment
29 | // Used by dvertextmain.cpp:DryadVertexMain
30 | //
31 | class DVertexHttpPnControllerOuter : public DVertexPnControllerOuter
32 | {
33 | private:
34 | DVertexPnController* MakePnController(UInt32 vertexId,
35 | UInt32 vertexVersion);
36 | };
37 |
38 | class DVertexHttpPnController : public DVertexPnController
39 | {
40 | public:
41 | DVertexHttpPnController(DVertexPnControllerOuter* parent,
42 | UInt32 vertexId, UInt32 vertexVersion, const char* serverAddress);
43 | ~DVertexHttpPnController();
44 |
45 | void SendSetStatusRequest(DryadPnProcessPropertyRequest* r);
46 | void ConsiderNextSendRequest(DryadPnProcessPropertyRequest* r);
47 |
48 | HANDLE GetCommandLoopEvent();
49 |
50 | private:
51 | void SendSetStatusRequestInternal(DryadPnProcessPropertyRequest* r);
52 | DryadPnProcessPropertyRequest*
53 | MakeSetStatusRequest(UInt32 exitOnCompletion,
54 | bool isAssert,
55 | bool notifyWaiters);
56 | unsigned CommandLoop();
57 |
58 | bool m_sending;
59 | DrRef m_nextSend;
60 | DrStr64 m_serverAddress;
61 | HANDLE m_commandLoopEvent;
62 | };
63 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/dprocess/src/dvertexxcomputepncontrol.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 |
26 | class DVertexXComputePnControllerOuter;
27 |
28 | class DVertexXComputePnController : public DVertexPnController
29 | {
30 | public:
31 | DVertexXComputePnController(DVertexPnControllerOuter* parent,
32 | UInt32 vertexId, UInt32 vertexVersion);
33 |
34 | void SendSetStatusRequest(DryadPnProcessPropertyRequest* r);
35 |
36 | private:
37 | DryadPnProcessPropertyRequest*
38 | MakeSetStatusRequest(UInt32 exitOnCompletion,
39 | bool isAssert,
40 | bool notifyWaiters);
41 | unsigned CommandLoop();
42 |
43 | //
44 | // Get wrapper
45 | //
46 | DVertexXComputePnControllerOuter* GetParent();
47 | };
48 |
49 | //
50 | // Wrapper for PN controller and environment
51 | // Used by dvertextmain.cpp:DryadVertexMain
52 | //
53 | class DVertexXComputePnControllerOuter : public DVertexPnControllerOuter
54 | {
55 | private:
56 | DVertexPnController* MakePnController(UInt32 vertexId,
57 | UInt32 vertexVersion);
58 | };
59 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/managedchannel/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("Microsoft.Research.Dryad.ManagedChannel")]
28 |
29 | // The following GUID is for the ID of the typelib if this project is exposed to COM
30 | [assembly: Guid("f806a093-c5ae-4752-82d3-26bcc2341b29")]
31 |
32 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/system/managedchannel/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/VertexHostMain/Program.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 | using System;
21 | using System.Collections.Generic;
22 | using System.Linq;
23 | using System.Text;
24 |
25 | namespace VertexHostMain
26 | {
27 | internal class ConfigDependency : Microsoft.Research.Peloponnese.Shared.AssemblyDependencyAttribute
28 | {
29 | public
30 | ConfigDependency()
31 | : base("Microsoft.Research.Dryad.VertexHost.exe.config", false)
32 | {
33 | }
34 | }
35 |
36 | class Program
37 | {
38 | static int Main(string[] args)
39 | {
40 | return VertexHost.Main(args);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/VertexHostMain/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | [assembly: VertexHostMain.ConfigDependency()]
25 |
26 | // General Information about an assembly is controlled through the following
27 | // set of attributes. Change these attribute values to modify the information
28 | // associated with an assembly.
29 | [assembly: AssemblyTitle("Microsoft.Research.Dryad.VertexHost")]
30 |
31 | // The following GUID is for the ID of the typelib if this project is exposed to COM
32 | [assembly: Guid("5534b858-8472-4dc3-8f24-5b59f8805156")]
33 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/VertexHostMain/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/WrapperNativeInfo/NullChannelTransform.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #include "stdafx.h"
22 |
23 | #include
24 |
25 | #pragma unmanaged
26 |
27 |
28 | ChannelTransform::~ChannelTransform()
29 | {
30 | // nothing needed here
31 | }
32 |
33 | NullChannelTransform::NullChannelTransform(DryadVertexProgram* vertex)
34 | {
35 | m_vertex = vertex;
36 | }
37 |
38 | NullChannelTransform::~NullChannelTransform()
39 | {
40 | m_channel = NULL;
41 | }
42 |
43 | DrError NullChannelTransform::Start(FifoChannel *channel)
44 | {
45 | m_channel = channel;
46 | return DrError_OK;
47 | }
48 |
49 | void NullChannelTransform::SetOutputBufferSize(UInt32 bufferSize)
50 | {
51 | // nothing needed here
52 | }
53 |
54 | DrError NullChannelTransform::ProcessItem(DataBlockItem *item)
55 | {
56 | m_channel->WriteTransformedItem(item);
57 | return DrError_OK;
58 | }
59 |
60 | DrError NullChannelTransform::Finish(bool atEndOfStream)
61 | {
62 | m_channel = NULL;
63 | return DrError_OK;
64 | }
65 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/WrapperNativeInfo/WrapperNativeInfo.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
6 | h;hpp;hxx;hm;inl;inc;xsd
7 |
8 |
9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx
11 |
12 |
13 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
14 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
15 |
16 |
17 |
18 |
19 | Header Files
20 |
21 |
22 |
23 |
24 | Source Files
25 |
26 |
27 | Source Files
28 |
29 |
30 | Source Files
31 |
32 |
33 | Source Files
34 |
35 |
36 | Source Files
37 |
38 |
39 | Source Files
40 |
41 |
42 | Source Files
43 |
44 |
45 | Source Files
46 |
47 |
48 | Source Files
49 |
50 |
51 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/WrapperNativeInfo/stdafx.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "DrExecution.h"
24 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/WrapperNativeInfoDll/DryadLINQNativeChannels.def:
--------------------------------------------------------------------------------
1 | LIBRARY "Microsoft.Research.Dryad.DryadLinq.NativeWrapper.dll"
2 |
3 | EXPORTS
4 | GetTotalLength
5 | GetExpectedLength
6 | GetVertexId
7 | GetNumOfInputs
8 | GetNumOfOutputs
9 | SetInitialSizeHint
10 | GetInputChannelURI
11 | GetOutputChannelURI
12 | Flush
13 | Close
14 | ReadDataBlock
15 | WriteDataBlock
16 | AllocateDataBlock
17 | ReleaseDataBlock
18 | EnableFifoInputChannel
19 | EnableFifoOutputChannel
20 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/WrapperNativeInfoDll/WrapperNativeInfoDll.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
6 | h;hpp;hxx;hm;inl;inc;xsd
7 |
8 |
9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx
11 |
12 |
13 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
14 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
15 |
16 |
17 |
18 |
19 | Header Files
20 |
21 |
22 |
23 |
24 | Source Files
25 |
26 |
27 | Source Files
28 |
29 |
30 |
31 |
32 | Source Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/WrapperNativeInfoDll/stdafx.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "DrExecution.h"
24 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/WrapperNativeInfoDll/version.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MicrosoftResearch/Dryad/ad28579dd8303925befc6502633949850b7ca550/DryadVertex/VertexHost/vertex/WrapperNativeInfoDll/version.cpp
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/ChannelTransform.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 | #include
26 | class FifoChannel;
27 |
28 | class ChannelTransform
29 | {
30 | public:
31 | virtual ~ChannelTransform() = 0;
32 | virtual DrError Start(FifoChannel *channel) = 0;
33 | virtual void SetOutputBufferSize(UInt32 bufferSize) = 0;
34 | virtual DrError ProcessItem(DataBlockItem *item) = 0;
35 | virtual DrError Finish(bool atEndOfStream) = 0;
36 | protected:
37 | DryadVertexProgram *m_vertex; // used for error reporting
38 | };
39 |
40 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/CompressionVertex.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 |
26 | /* A CompressionVertex is a vertex that will either compress or decompress it's input using
27 | the gzip format. The vertex takes one argument, which is either compress or decompress.
28 | The vertex can only be called with one output channel, but may be called with multiple
29 | input channels. The requested operation is applied to each input channel in order. */
30 | class CompressionVertex : public DryadVertexProgram
31 | {
32 | public:
33 | CompressionVertex();
34 |
35 | void Main(WorkQueue* workQueue,
36 | UInt32 numberOfInputChannels,
37 | RChannelReader** inputChannel,
38 | UInt32 numberOfOutputChannels,
39 | RChannelWriter** outputChannel);
40 |
41 | private:
42 |
43 | };
44 |
45 | typedef StdTypedVertexFactory FactoryCompressionVertexWrapper;
46 |
47 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/DataBlockItem.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "DrCommon.h"
24 | #include
25 | #include
26 | #include
27 |
28 | class DataBlockItem : public RChannelDataItem
29 | {
30 | public:
31 | DataBlockItem(DrMemoryBuffer* buf);
32 | DataBlockItem(Size_t size);
33 | ~DataBlockItem();
34 | Size_t GetAllocatedSize();
35 | Size_t GetAvailableSize();
36 | void SetAvailableSize(Size_t size);
37 | void * GetDataAddress();
38 | DrMemoryBuffer * GetData();
39 |
40 | virtual UInt64 GetItemSize() const;
41 |
42 | private:
43 | DrRef m_buf;
44 | };
45 |
46 | class DataBlockParser : public RChannelItemParser
47 | {
48 | public:
49 | DataBlockParser() {};
50 |
51 | DataBlockParser(DObjFactoryBase* factory);
52 |
53 | RChannelItem* ParseNextItem(ChannelDataBufferList* bufferList,
54 | Size_t startOffset,
55 | Size_t* pOutLength);
56 | RChannelItem* ParsePartialItem(ChannelDataBufferList* bufferList,
57 | Size_t startOffset,
58 | RChannelBufferMarker*
59 | markerBuffer);
60 |
61 | };
62 |
63 | typedef StdParserFactory DataBlockParserFactory;
64 |
65 | class DataBlockMarshaler : public RChannelItemMarshaler
66 | {
67 | public:
68 | DrError MarshalItem(ChannelMemoryBufferWriter* writer,
69 | RChannelItem* item,
70 | bool flush,
71 | RChannelItemRef* pFailureItem);
72 | };
73 | typedef StdMarshalerFactory DataBlockMarshalerFactory;
74 |
75 |
76 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/FifoChannel.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 | #include
23 | #include
24 | #include
25 |
26 | enum FifoReaderState {
27 | RS_Stopped,
28 | RS_OutstandingHandler,
29 | RS_Stopping
30 | };
31 |
32 | class FifoChannelItemWriterHandler : public RChannelItemWriterHandler
33 | {
34 | public:
35 | virtual ~FifoChannelItemWriterHandler();
36 | virtual void ProcessWriteCompleted(RChannelItemType status,
37 | RChannelItem* marshalFailureItem);
38 | };
39 |
40 | class FifoChannel : public RChannelItemWriterHandler,
41 | public RChannelItemReaderHandlerQueued
42 | {
43 | public:
44 | FifoChannel(RChannelReader* reader,
45 | RChannelWriter *writer,
46 | DryadVertexProgram* vertex,
47 | TransformType transType);
48 | virtual ~FifoChannel();
49 | virtual void ProcessItem(RChannelItem* deliveredItem);
50 | virtual void ProcessWriteCompleted(RChannelItemType status,
51 | RChannelItem* marshalFailureItem);
52 | void MaybeSendHandler();
53 | void Start();
54 | bool Stop(RChannelWriter* fifoWriter);
55 | void Drain(bool mustWait);
56 | void WriteTransformedItem(RChannelItem* transformedItem);
57 | private:
58 |
59 | bool m_initialHandlerSent;
60 | ChannelTransform *m_transform;
61 | RChannelReader *m_reader;
62 | RChannelWriter *m_writer;
63 | CRITSEC m_critsec;
64 | HANDLE m_shutdownEvent;
65 | int m_numItemsInFlight;
66 | FifoReaderState m_state;
67 | FifoChannelItemWriterHandler *m_fifoWriterHandler;
68 | DryadVertexProgram *m_vertex;
69 | };
70 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/FifoInputChannel.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 |
26 | class FifoInputChannel : public InputChannel
27 | {
28 | public:
29 | FifoInputChannel(UInt32 portNum, DryadVertexProgram* vertex,
30 | WorkQueue *workQueue, RChannelReader* channel,
31 | TransformType tType);
32 | void Stop();
33 | virtual DataBlockItem* ReadDataBlock(byte **ppDataBlock,
34 | Int32 *ppDataBlockSize,
35 | Int32 *pErrorCode);
36 | bool GetTotalLength(UInt64 *length);
37 | bool GetExpectedLength(UInt64 *length);
38 | const char* GetURI();
39 | private:
40 | void MakeFifo(UInt32 fifoLength, WorkQueue* workQueue);
41 |
42 | bool m_initialHandlerSent;
43 | FifoChannel *m_fifoChannel;
44 | RChannelReaderHolderRef m_fifoReader;
45 | RChannelWriterHolderRef m_fifoWriter;
46 | RChannelReader* m_origReader;
47 | };
48 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/FifoOutputChannel.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 | #include
23 | #include
24 |
25 | class FifoOutputChannel: public OutputChannel
26 | {
27 | public:
28 | FifoOutputChannel(UInt32 portNum, DryadVertexProgram* vertex,
29 | WorkQueue *workQueue, RChannelWriter* outputChannel,
30 | TransformType tType);
31 | void Stop();
32 |
33 | void SetInitialSizeHint(UInt64 hint);
34 | const char* GetURI();
35 |
36 | private:
37 | FifoChannel *m_fifoChannel;
38 | RChannelReaderHolderRef m_fifoReader;
39 | RChannelWriterHolderRef m_fifoWriter;
40 | RChannelWriter* m_origWriter;
41 | void MakeFifo(UInt32 fifoLength, WorkQueue* workQueue);
42 | };
43 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/GzipCompressionChannelTransform.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 | #include
23 | #include
24 | #include
25 | #ifndef Z_PREFIX
26 | #define Z_PREFIX
27 | #endif
28 | #ifdef LINKWITHZLIB
29 | #include "zlib.h"
30 |
31 |
32 | class GzipCompressionChannelTransform : public ChannelTransform
33 | {
34 | public:
35 | GzipCompressionChannelTransform(DryadVertexProgram* vertex, bool gzipHeader, bool optimizeForSpeed);
36 | virtual ~GzipCompressionChannelTransform();
37 | virtual DrError Start(FifoChannel *channel);
38 | virtual void SetOutputBufferSize(UInt32 bufferSize);
39 | virtual DrError ProcessItem(DataBlockItem *item);
40 | virtual DrError Finish(bool atEndOfStream);
41 |
42 | private:
43 | void AllocateOutputBuffer();
44 | void AppendOutputByte(byte value);
45 | void IncrementOutputPosition(UInt32 increment);
46 | DrError ProcessBlock();
47 | void WriteOutputBuffer();
48 | void WriteGzipHeader();
49 |
50 | bool m_firstReadProcessed;
51 | UInt32 m_crc;
52 | int m_zlibArg;
53 | byte *m_crcStart;
54 | FifoChannel *m_channel;
55 | UInt32 m_writeSize;
56 | z_stream m_stream;
57 | DrRef m_outputBuffer;
58 | bool m_gzipHeader;
59 | bool m_optimizeForSpeed;
60 | CRITSEC m_critsec;
61 | };
62 | #endif
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/GzipDecompressionChannelTransform.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 | #include
23 | #include
24 | #include
25 | #ifndef Z_PREFIX
26 | #define Z_PREFIX
27 | #endif
28 |
29 | #ifdef LINKWITHZLIB
30 | #include "zlib.h"
31 |
32 | class GzipDecompressionChannelTransform : public ChannelTransform
33 | {
34 | public:
35 | GzipDecompressionChannelTransform(DryadVertexProgram * vertex, bool gzipHeader);
36 | virtual ~GzipDecompressionChannelTransform();
37 | virtual DrError Start(FifoChannel *channel);
38 | virtual void SetOutputBufferSize(UInt32 bufferSize);
39 | virtual DrError ProcessItem(DataBlockItem *item);
40 | virtual DrError Finish(bool atEndOfStream);
41 |
42 | private:
43 | inline DrError IncrementInputPosition(UInt32 increment);
44 | DrError ReadGzipHeader();
45 | DrError AllocateOutputBuffer();
46 | void WriteOutputBuffer();
47 | DrError ProcessTrailer();
48 | void DecompressionError();
49 |
50 | static const int TrailerLength = 8;
51 | byte *m_trailerBytes;
52 | UInt32 m_trailerBytesFilled;
53 | bool m_firstReadProcessed;
54 | UInt32 m_crc;
55 | byte *m_crcStart;
56 | FifoChannel *m_channel;
57 | Size_t m_writeSize;
58 | z_stream m_stream;
59 | DrRef m_outputBuffer;
60 | bool m_gzipHeader;
61 | };
62 | #endif
63 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/InputChannel.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 | #include
23 | #include
24 | #include
25 |
26 | class InputChannel
27 | {
28 | public:
29 | InputChannel(UInt32 portNum,
30 | DryadVertexProgram* vertex,
31 | RChannelReader* channel);
32 | virtual ~InputChannel();
33 |
34 | virtual void Stop();
35 |
36 | virtual DataBlockItem* ReadDataBlock(byte **ppDataBlock,
37 | Int32 *ppDataBlockSize,
38 | Int32 *pErrorCode);
39 | virtual bool AtEndOfChannel();
40 | Int64 GetBytesRead();
41 | RChannelReader* GetReader();
42 | virtual bool GetTotalLength(UInt64 *length);
43 | virtual bool GetExpectedLength(UInt64 *length);
44 | virtual const char* GetURI();
45 |
46 | protected:
47 | RChannelReader* m_reader;
48 | DryadVertexProgram* m_vertex;
49 | Int64 m_bytesRead;
50 | UInt32 m_portNum;
51 | bool m_atEOC;
52 | };
53 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/ManagedWrapper.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 | class ManagedWrapperVertex : public DryadVertexProgram
29 | {
30 | public:
31 | ManagedWrapperVertex();
32 |
33 | void Main(WorkQueue* workQueue,
34 | UInt32 numberOfInputChannels,
35 | RChannelReader** inputChannel,
36 | UInt32 numberOfOutputChannels,
37 | RChannelWriter** outputChannel);
38 |
39 | private:
40 | static ICLRRuntimeHost *pClrHost; // we only need one per process
41 | static DrCriticalSection m_atomic; // loading the CLR should be atomic
42 |
43 | // Use DryadLinqLog to log messages from the DryadLinqRuntime
44 | // These messages will be send both to the logging infrastructure, but also to the vertex standard error.
45 | void DryadLinqLog(LogLevel level, const char* title, const char* fmt, va_list args);
46 | };
47 |
48 | typedef StdTypedVertexFactory FactoryMWrapper;
49 |
50 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/NullChannelTransform.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 | #include
23 | #include
24 |
25 | class NullChannelTransform : public ChannelTransform
26 | {
27 | public:
28 | NullChannelTransform(DryadVertexProgram* vertex);
29 | virtual ~NullChannelTransform();
30 | virtual DrError Start(FifoChannel *channel);
31 | virtual void SetOutputBufferSize(UInt32 bufferSize);
32 | virtual DrError ProcessItem(DataBlockItem *item);
33 | virtual DrError Finish(bool atEndOfStream);
34 | private:
35 | FifoChannel *m_channel;
36 | };
37 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/include/OutputChannel.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 | #include
23 | #include
24 | #include
25 |
26 | class OutputChannel : public RChannelItemWriterHandler
27 | {
28 | public:
29 | OutputChannel(UInt32 portNum,
30 | DryadVertexProgram* vertex,
31 | RChannelWriter* outputChannel);
32 | virtual ~OutputChannel();
33 |
34 | virtual void Stop();
35 |
36 | BOOL WriteDataBlock(DataBlockItem *pItem,
37 | Int32 numBytesToWrite);
38 | void ProcessWriteCompleted(RChannelItemType status,
39 | RChannelItem* marshalFailureItem);
40 | Int64 GetBytesWritten();
41 | virtual void SetInitialSizeHint(UInt64 hint);
42 | RChannelWriter* GetWriter();
43 | virtual const char* GetURI();
44 |
45 | protected:
46 | RChannelWriter* m_writer;
47 | DryadVertexProgram* m_vertex;
48 | Int64 m_bytesWritten;
49 | UInt32 m_portNum;
50 | };
51 |
52 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/managedwrappervertex/ManagedWrapperVertex.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
6 | h;hpp;hxx;hm;inl;inc;xsd
7 |
8 |
9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx
11 |
12 |
13 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
14 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
15 |
16 |
17 |
18 |
19 | Header Files
20 |
21 |
22 |
23 |
24 | Header Files
25 |
26 |
27 |
28 |
29 | Source Files
30 |
31 |
32 | Source Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/managedwrappervertex/stdafx.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "DrExecution.h"
24 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/vertexHost/VertexHost.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/vertexHost/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/DryadVertex/VertexHost/vertex/vertexHost/version.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MicrosoftResearch/Dryad/ad28579dd8303925befc6502633949850b7ca550/DryadVertex/VertexHost/vertex/vertexHost/version.cpp
--------------------------------------------------------------------------------
/GraphManager/filesystem/DrFileSystems.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | #include
26 | #include
27 | #include
28 |
29 |
--------------------------------------------------------------------------------
/GraphManager/gang/DrGangHeaders.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
--------------------------------------------------------------------------------
/GraphManager/gang/DrMetaData.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 |
24 | DRBASECLASS(DrMetaData), public DrPropertyParser
25 | {
26 | public:
27 | DrMetaData();
28 |
29 | void Append(DrMTagPtr tag);
30 | DrMTagPtr LookUp(UINT16 enumId);
31 | DrMTagListPtr GetTags();
32 |
33 | void Serialize(DrPropertyWriterPtr writer);
34 | void CacheSerialization();
35 | virtual HRESULT ParseProperty(DrPropertyReaderPtr reader, UINT16 enumID, UINT32 dataLen);
36 |
37 | private:
38 | DrMTagListRef m_tagList;
39 | DrByteArrayRef m_cachedSerialization;
40 | };
41 | DRREF(DrMetaData);
--------------------------------------------------------------------------------
/GraphManager/graph/DrDefaultParameters.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | DRCLASS(DrDefaultParameters)
24 | {
25 | public:
26 | static DrGraphParametersRef Make(DrNativeString exeName, DrNativeString jobClass, bool enableSpeculativeDuplication);
27 |
28 | static DrProcessTemplateRef MakeProcessTemplate(DrNativeString exeName, DrNativeString jobClass);
29 | static DrVertexTemplateRef MakeVertexTemplate();
30 | };
31 |
--------------------------------------------------------------------------------
/GraphManager/graph/DrGraphExecutor.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | DRCLASS(DrGraphExecutor) : public DrCritSec, public DrErrorListener
24 | {
25 | public:
26 | DrGraphExecutor();
27 | ~DrGraphExecutor();
28 |
29 | DrGraphPtr Initialize(DrGraphParametersPtr parameters);
30 |
31 | void Run();
32 | DrErrorPtr Join();
33 |
34 | virtual void ReceiveMessage(DrErrorRef exitStatus);
35 |
36 | private:
37 | DrGraphRef m_graph;
38 | HANDLE m_event;
39 | DrErrorRef m_exitStatus;
40 | };
41 | DRREF(DrGraphExecutor);
--------------------------------------------------------------------------------
/GraphManager/graph/DrGraphHeaders.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | #include
26 | #include
27 | #include
28 |
--------------------------------------------------------------------------------
/GraphManager/jobmanager/DrHeaders.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | //#define _CRTDBG_MAP_ALLOC
24 | //#include
25 | //#include
26 |
27 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
28 | #include
29 |
30 | #include
31 | #include
--------------------------------------------------------------------------------
/GraphManager/jobmanager/targetver.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | // Including SDKDDKVer.h defines the highest available Windows platform.
24 |
25 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
26 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
27 |
28 | #include
29 |
--------------------------------------------------------------------------------
/GraphManager/jobmanager/version.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MicrosoftResearch/Dryad/ad28579dd8303925befc6502633949850b7ca550/GraphManager/jobmanager/version.cpp
--------------------------------------------------------------------------------
/GraphManager/kernel/DrKernel.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 |
25 | #include
26 |
27 | #include
28 | #include
29 | #include
30 |
--------------------------------------------------------------------------------
/GraphManager/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GraphManager/reporting/DrArtemisLegacyReporting.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | DRCLASS(DrArtemisLegacyReporter) : public DrIReporter
24 | {
25 | public:
26 | /* the DrProcessListener implementation */
27 | virtual void ReceiveMessage(DrProcessInfoRef info) DROVERRIDE;
28 |
29 | /* the DrVertexListener implementation */
30 | virtual void ReceiveMessage(DrVertexInfoRef info) DROVERRIDE;
31 |
32 | /* the DrVertexTopologyReporter implementation */
33 | virtual void ReportFinalTopology(DrVertexPtr vertex, DrResourcePtr runningMachine,
34 | DrTimeInterval runningTime) DROVERRIDE;
35 |
36 | virtual void ReportStart(DrDateTime startTime) DROVERRIDE;
37 |
38 | virtual void ReportStop(UINT exitCode, DrNativeString errorString, DrDateTime stopTime) DROVERRIDE;
39 | };
40 | DRREF(DrArtemisLegacyReporter);
--------------------------------------------------------------------------------
/GraphManager/reporting/DrCalypsoReporting.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | DRCLASS(DrCalypsoReporter) : public DrIReporter
24 | {
25 | public:
26 | DrCalypsoReporter();
27 | DrCalypsoReporter(DrNativeString uriString);
28 |
29 | /* the DrProcessListener implementation */
30 | virtual void ReceiveMessage(DrProcessInfoRef info) DROVERRIDE;
31 |
32 | /* the DrVertexListener implementation */
33 | virtual void ReceiveMessage(DrVertexInfoRef info) DROVERRIDE;
34 |
35 | /* the DrVertexTopologyReporter implementation */
36 | virtual void ReportFinalTopology(DrVertexPtr vertex, DrResourcePtr runningMachine,
37 | DrTimeInterval runningTime) DROVERRIDE;
38 |
39 | virtual void ReportStart(DrDateTime startTime) DROVERRIDE;
40 |
41 | virtual void ReportStop(UINT exitCode, DrNativeString errorString, DrDateTime stopTime) DROVERRIDE;
42 |
43 | private:
44 | void Discard();
45 | System::String^ RecordTime();
46 | void BeginEntry(System::String^ entryTime, System::IO::TextWriter^ writer);
47 | void Flusher();
48 |
49 | System::IO::Stream^ m_logStream;
50 | System::IO::TextWriter^ m_writer;
51 | System::Threading::Tasks::TaskCompletionSource^ m_stop;
52 | System::Threading::Tasks::Task^ m_flusher;
53 | int m_flushInterval;
54 | };
55 | DRREF(DrCalypsoReporter);
--------------------------------------------------------------------------------
/GraphManager/reporting/DrReporting.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | DRCLASS(DrIReporter abstract) : public DrCritSec, public DrProcessListener, public DrVertexListener,
24 | public DrVertexTopologyReporter
25 | {
26 | public:
27 | /* the DrProcessListener implementation */
28 | virtual void ReceiveMessage(DrProcessInfoRef info) DRABSTRACT;
29 |
30 | /* the DrVertexListener implementation */
31 | virtual void ReceiveMessage(DrVertexInfoRef info) DRABSTRACT;
32 |
33 | /* the DrVertexTopologyReporter implementation */
34 | virtual void ReportFinalTopology(DrVertexPtr vertex, DrResourcePtr runningMachine,
35 | DrTimeInterval runningTime) DRABSTRACT;
36 |
37 | virtual void ReportStart(DrDateTime startTime) DRABSTRACT;
38 | virtual void ReportStop(UINT exitCode, DrNativeString errorString, DrDateTime stopTime) DRABSTRACT;
39 | };
40 | DRREF(DrIReporter);
41 |
42 | DRMAKEARRAYLIST(DrIReporterRef);
43 |
--------------------------------------------------------------------------------
/GraphManager/shared/DrAssert.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #define DrAssert(_c) if (!(_c)) DrLogA("Assertion failed: %s", #_c)
24 |
--------------------------------------------------------------------------------
/GraphManager/shared/DrErrorInternal.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | typedef DrDictionaryForString DrErrorDictionary;
24 | DRREF(DrErrorDictionary);
25 |
26 | DRCLASS(DrErrorText)
27 | {
28 | public:
29 | static void Initialize();
30 | static void Discard();
31 | static DrString GetErrorText(HRESULT err);
32 |
33 | private:
34 | static DrErrorDictionaryRef s_dictionary;
35 | };
36 |
--------------------------------------------------------------------------------
/GraphManager/shared/DrFileWriter.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | /* when there's time, I will write a high-performance file writer so we can get decent logging performance,
24 | but for now we are using regular WriteFile */
25 |
26 | #include
27 |
28 | DRCLASS(DrFileWriter) : public DrCritSec
29 | {
30 | public:
31 | DrFileWriter();
32 | ~DrFileWriter();
33 | #ifdef _MANAGED
34 | !DrFileWriter();
35 | #endif
36 |
37 | bool Open(DrString fileName);
38 | bool ReOpen(DrString fileName);
39 | void Flush();
40 | void Close();
41 |
42 | void Append(const char* data, int dataLength);
43 |
44 | private:
45 | void FlushInternal();
46 |
47 | HANDLE m_fileHandle;
48 | int m_dataBufferSize;
49 | char* m_bufferedData;
50 | int m_bufferedDataLength;
51 |
52 | };
53 | DRREF(DrFileWriter);
54 |
55 | DRCLASS(DrStaticFileWriters)
56 | {
57 | public:
58 | static void Initialize();
59 | static void AddWriter(DrFileWriterPtr writer);
60 | static void FlushWriters();
61 | static void Discard();
62 | };
--------------------------------------------------------------------------------
/GraphManager/shared/DrMultiMap.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft Corporation
3 |
4 | All rights reserved.
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | compliance with the License. You may obtain a copy of the License
8 | at http://www.apache.org/licenses/LICENSE-2.0
9 |
10 |
11 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
12 | EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
13 | TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
14 |
15 |
16 | See the Apache Version 2.0 License for specific language governing permissions and
17 | limitations under the License.
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #ifdef _MANAGED
24 |
25 | #include
26 |
27 | template DRBASECLASS(DrMultiMap)
28 | {
29 | typedef cliext::multimap Map;
30 | #else
31 |
32 | #include