Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Use ZooKeeperNet and log4net nuget packages #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Kafka/Kafka.Client/Kafka.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<HintPath>..\..\..\lib\Crc32C\Crc32C.NET.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>..\..\..\lib\log4Net\log4net.dll</HintPath>
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
Expand All @@ -125,7 +125,7 @@
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="ZooKeeperNet">
<HintPath>..\..\..\lib\zookeeper\ZooKeeperNet.dll</HintPath>
<HintPath>..\packages\ZooKeeper.Net.3.4.6.0\lib\net40\ZooKeeperNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Kafka/Kafka.Client/ZKClient/Exceptions/ZkException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public ZkException(string message, Exception innerException)

public static ZkException Create(KeeperException e)
{
switch (e.GetCode())
switch (e.ErrorCode)
{
case KeeperException.Code.NONODE:
return new ZkNoNodeException(e.Message, e);
Expand Down
2 changes: 1 addition & 1 deletion src/Kafka/Kafka.Client/ZKClient/ZkConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public bool Exists(string path, bool watch)

public List<string> GetChildren(string path, bool watch)
{
return this._zk.GetChildren(path, watch);
return new List<string>(this._zk.GetChildren(path, watch));
}

public byte[] ReadData(string path, Stat stat, bool watch)
Expand Down
2 changes: 2 additions & 0 deletions src/Kafka/Kafka.Client/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Crc32C.NET" version="1.0.5.0" targetFramework="net40" />
<package id="log4net" version="2.0.3" targetFramework="net40" />
<package id="Metrics.NET" version="0.1.6" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.2" targetFramework="net40" />
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net40" />
<package id="ZooKeeper.Net" version="3.4.6.0" targetFramework="net40" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<AssemblyName>Kafka.Performance.Common</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -31,7 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\lib\log4Net\log4net.dll</HintPath>
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -46,7 +48,17 @@
<Compile Include="PerfConfig.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
4 changes: 4 additions & 0 deletions src/Kafka/Kafka.Performance.Common/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.3" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<AssemblyName>Kafka.Performance.Consumer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -33,7 +35,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\lib\log4Net\log4net.dll</HintPath>
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -49,6 +51,7 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Kafka.Client\Kafka.Client.csproj">
Expand All @@ -61,6 +64,13 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
4 changes: 4 additions & 0 deletions src/Kafka/Kafka.Performance.Consumer/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.3" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -49,7 +51,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\lib\log4Net\log4net.dll</HintPath>
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -78,6 +80,7 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
Expand All @@ -97,6 +100,13 @@
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
4 changes: 4 additions & 0 deletions src/Kafka/Kafka.Performance.Producer/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.3" targetFramework="net45" />
</packages>
10 changes: 4 additions & 6 deletions src/Kafka/Kafka.Tests/Kafka.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@
<AssemblyOriginatorKeyFile>kafkaclient.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\log4Net\log4net.dll</HintPath>
<Reference Include="log4net">
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Spring.Threading, Version=1.0.0.22880, Culture=neutral, PublicKeyToken=b745dc0af8c84db9, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -57,9 +56,8 @@
<Reference Include="xunit">
<HintPath>..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
</Reference>
<Reference Include="ZooKeeperNet, Version=3.3.4.1, Culture=neutral, PublicKeyToken=fefd2c046da35b56, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\zookeeper\ZooKeeperNet.dll</HintPath>
<Reference Include="ZooKeeperNet">
<HintPath>..\packages\ZooKeeper.Net.3.4.6.0\lib\net40\ZooKeeperNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Kafka/Kafka.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.3" targetFramework="net45" />
<package id="xunit" version="1.9.2" targetFramework="net45" />
<package id="ZooKeeper.Net" version="3.4.6.0" targetFramework="net45" />
</packages>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading