-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #645 from FederatedAI/dev-2.5.2-merge
merge
- Loading branch information
Showing
107 changed files
with
9,092 additions
and
615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
eggroll.version=2.5.1 | ||
eggroll.version=2.5.2 |
27 changes: 27 additions & 0 deletions
27
jvm/core/main/java/com/webank/eggroll/core/util/CacheUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.webank.eggroll.core.util; | ||
|
||
import com.google.common.cache.Cache; | ||
import com.google.common.cache.CacheBuilder; | ||
import com.google.common.cache.CacheLoader; | ||
import com.webank.eggroll.core.meta.ErProcessor; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
public class CacheUtil { | ||
|
||
public static Cache<String,ErProcessor> buildErProcessorCache(int maxsize, int expireTime, TimeUnit timeUnit){ | ||
return CacheBuilder.newBuilder() | ||
.maximumSize(maxsize) | ||
.expireAfterWrite(expireTime,timeUnit) | ||
.build(); | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
alter table session_processor add `processor_option` VARCHAR(512); | ||
|
||
|
||
|
||
CREATE TABLE IF NOT EXISTS `processor_resource` | ||
( | ||
`id` SERIAL PRIMARY KEY, | ||
`processor_id` BIGINT NOT NULL, | ||
`session_id` VARCHAR(767), | ||
`server_node_id` INT NOT NULL, | ||
`resource_type` VARCHAR(255), | ||
`allocated` BIGINT NOT NULL default 0, | ||
`extention` VARCHAR(512), | ||
`status` VARCHAR(255), | ||
`pid` INT NOT NULL DEFAULT -1, | ||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | ||
) DEFAULT CHARACTER SET latin1 | ||
COLLATE latin1_swedish_ci; | ||
CREATE INDEX `idx_processor_id_processor_resource` ON `processor_resource` (`processor_id`); | ||
CREATE INDEX `idx_node_id_processor_resource` ON `processor_resource` (`server_node_id`); | ||
CREATE INDEX `idx_session_id_processor_resource` ON `processor_resource` (`session_id`); | ||
CREATE INDEX `idx_node_status_processor_resource` ON `processor_resource` (`server_node_id`,`resource_type`,`status`); | ||
|
||
|
||
|
||
CREATE TABLE IF NOT EXISTS `node_resource` | ||
( | ||
`resource_id` SERIAL PRIMARY KEY, | ||
`server_node_id` BIGINT NOT NULL, | ||
`resource_type` VARCHAR(255), | ||
`total` BIGINT NOT NULL default 0, | ||
`used` BIGINT NOT NULL default 0, | ||
`pre_allocated` BIGINT NOT NULL default 0, | ||
`allocated` BIGINT NOT NULL DEFAULT 0, | ||
`extention` VARCHAR(512), | ||
`status` VARCHAR(255), | ||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | ||
) DEFAULT CHARACTER SET latin1 | ||
COLLATE latin1_swedish_ci; | ||
CREATE INDEX `idx_node_id_node_resource` ON `node_resource` (`server_node_id`); | ||
CREATE INDEX `idx_node_status_node_resource` ON `node_resource` (`server_node_id`,`status`); | ||
CREATE UNIQUE INDEX `idx_u_node_resource` ON `node_resource` (`server_node_id`, `resource_type`); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS `session_ranks` | ||
( | ||
`container_id` SERIAL PRIMARY KEY, | ||
`session_id` VARCHAR(767), | ||
`server_node_id` INT NOT NULL, | ||
`global_rank` INT UNSIGNED NOT NULL, | ||
`local_rank` INT UNSIGNED NOT NULL | ||
) DEFAULT CHARACTER SET latin1 | ||
COLLATE latin1_swedish_ci; | ||
|
||
CREATE INDEX `idx_session_id_session_ranks` ON `session_ranks` (`session_id`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.