jamsesso / meshmap Goto Github PK
View Code? Open in Web Editor NEWA distributed hash table implementation
License: MIT License
A distributed hash table implementation
License: MIT License
Currently getNodeForKey
searches the list of nodes linearly. This could be done in O(log(n))
time using a binary search.
Transient nodes are nodes that can read from the cluster, but are not used for storage.
> Task :compileJava FAILED
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:49: error: cannot find symbol
socket.connect(node.getAddress());
^
symbol: method getAddress()
location: variable node of type Node
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:70: error: constructor BroadcastResponse in class BroadcastResponse cannot be applied to given types;
return new BroadcastResponse(node, message(node, message));
^
required: no arguments
found: Node,Message
reason: actual and formal argument lists differ in length
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:77: error: constructor BroadcastResponse in class BroadcastResponse cannot be applied to given types;
return new BroadcastResponse(node, Message.ERR);
^
required: no arguments
found: Node,Message
reason: actual and formal argument lists differ in length
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:80: error: invalid method reference
.collect(Collectors.toMap(BroadcastResponse::getNode, BroadcastResponse::getResponse));
^
cannot find symbol
symbol: method getNode()
location: class BroadcastResponse
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:80: error: invalid method reference
.collect(Collectors.toMap(BroadcastResponse::getNode, BroadcastResponse::getResponse));
^
cannot find symbol
symbol: method getResponse()
location: class BroadcastResponse
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:86: error: cannot find symbol
serverSocket = new ServerSocket(self.getAddress().getPort());
^
symbol: method getAddress()
location: variable self of type Node
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:38: error: cannot find symbol
switch (message.getType()) {
^
symbol: method getType()
location: variable message of type Message
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:52: error: cannot find symbol
delegate.put(entry.getKey(), entry.getValue());
^
symbol: method getKey()
location: variable entry of type Entry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:52: error: cannot find symbol
delegate.put(entry.getKey(), entry.getValue());
^
symbol: method getValue()
location: variable entry of type Entry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:87: error: constructor Entry in class Entry cannot be applied to given types;
.map(entry -> new Entry(entry.getKey(), entry.getValue()))
^
required: no arguments
found: Object,Object
reason: actual and formal argument lists differ in length
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:106: error: cannot find symbol
.filter(response -> TYPE_SIZE.equals(response.getType()))
^
symbol: method getType()
location: variable response of type Message
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:202: error: cannot infer type arguments for TypedEntry<>
entries.add(new TypedEntry<>((K) localEntry.getKey(), (V) localEntry.getValue()));
^
reason: cannot infer type-variable(s) K,V
(actual and formal argument lists differ in length)
where K,V are type-variables:
K extends Object declared in class TypedEntry
V extends Object declared in class TypedEntry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:209: error: cannot find symbol
entries.add(new TypedEntry<>((K) remoteEntry.getKey(), (V) remoteEntry.getValue()));
^
symbol: method getKey()
location: variable remoteEntry of type Entry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:209: error: cannot find symbol
entries.add(new TypedEntry<>((K) remoteEntry.getKey(), (V) remoteEntry.getValue()));
^
symbol: method getValue()
location: variable remoteEntry of type Entry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:209: error: cannot infer type arguments for TypedEntry<>
entries.add(new TypedEntry<>((K) remoteEntry.getKey(), (V) remoteEntry.getValue()));
^
reason: cannot infer type-variable(s) K,V
(actual and formal argument lists differ in length)
where K,V are type-variables:
K extends Object declared in class TypedEntry
V extends Object declared in class TypedEntry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:316: error: cannot find symbol
if (!TYPE_GET.equals(response.getType())) {
^
symbol: method getType()
location: variable response of type Message
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:329: error: constructor Entry in class Entry cannot be applied to given types;
Message putMsg = new Message(TYPE_PUT, new Entry(key, value));
^
required: no arguments
found: Object,Object
reason: actual and formal argument lists differ in length
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:362: error: cannot find symbol
if (!TYPE_REMOVE.equals(response.getType())) {
^
symbol: method getType()
location: variable response of type Message
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:393: error: TypedEntry is not abstract and does not override abstract method getValue() in Entry
private static class TypedEntry<K, V> implements Map.Entry<K, V> {
^
where V is a type-variable:
V extends Object declared in class TypedEntry
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
19 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
1 actionable task: 1 executed
Nodes are randomly placed on the cluster ring. It would be beneficial to add an API for users to place nodes on the ring in predetermined positions (in cases where server A has 2x memory of server B, the position of server A should be such that ~2/3 of the data is stored on server A)
Currently a putAll naively calls put on each entry supplied. Instead, the method should group the entries by target node and put the entries in each group in batches.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.