Unverified Commit ab555936 authored by ZackYoung's avatar ZackYoung Committed by GitHub

refactor admin hdfs file upload (#1574)

* optimize hdfs upload module & i18 exception optimize * optimize hdfs upload module & i18 exception optimize
parent e0a1b2f6
......@@ -21,6 +21,7 @@ on:
jobs:
build-documentation:
if: github.repository == 'DataLinkDC/dinky'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
......
......@@ -17,9 +17,10 @@
*
*/
package org.dinky.exception;
package org.dinky.aop;
import org.dinky.common.result.Result;
import org.dinky.exception.BusException;
import org.dinky.model.CodeEnum;
import org.dinky.utils.MessageResolverUtils;
......@@ -44,6 +45,7 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import cn.dev33.satoken.exception.NotLoginException;
import cn.hutool.core.util.StrUtil;
/**
* WebExceptionHandler
......@@ -59,7 +61,10 @@ public class WebExceptionHandler {
@ExceptionHandler
public Result<Void> busException(BusException e) {
return Result.failed(e.getMessage());
if (StrUtil.isNotEmpty(e.getMsg())) {
return Result.failed(MessageResolverUtils.getMessages(e.getCode(), e.getErrorArgs()));
}
return Result.failed(e.getMsg());
}
@ExceptionHandler
......
......@@ -21,6 +21,7 @@ package org.dinky.common.result;
import org.dinky.enums.Status;
import org.dinky.model.CodeEnum;
import org.dinky.utils.MessageResolverUtils;
import java.io.Serializable;
import java.text.MessageFormat;
......@@ -69,6 +70,13 @@ public class Result<T> implements Serializable {
return of(null, CodeEnum.SUCCESS.getCode(), msg);
}
public static <T> Result<T> succeed() {
return of(
null,
CodeEnum.SUCCESS.getCode(),
MessageResolverUtils.getMessage("operate.success"));
}
public static <T> Result<T> succeed(T model, String msg) {
return of(model, CodeEnum.SUCCESS.getCode(), msg);
}
......
......@@ -41,7 +41,7 @@ import cn.dev33.satoken.interceptor.SaInterceptor;
* @since 2021/11/28 19:35
*/
@Configuration
public class AppConfiguration implements WebMvcConfigurer {
public class AppConfig implements WebMvcConfigurer {
/**
* Cookie
......
......@@ -33,7 +33,7 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
* @since 2022/09/24 11:23
*/
@Configuration
public class CacheConfigure {
public class CacheConfig {
/** 配置Redis缓存注解的value序列化方式 */
@Bean
......
......@@ -32,7 +32,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class Knife4jConfiguration {
public class Knife4jConfig {
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
......
......@@ -54,7 +54,7 @@ public class FileUploadController {
* @return {@link Result}
*/
@PostMapping
public Result upload(
public Result<Void> upload(
@RequestPart("files") MultipartFile[] files,
@RequestParam(value = "dir", defaultValue = "", required = false) String dir,
@RequestParam(value = "fileType", defaultValue = "-1", required = false)
......@@ -66,10 +66,11 @@ public class FileUploadController {
}
if (StringUtils.isEmpty(dir)) {
return fileUploadService.upload(files, fileType);
fileUploadService.upload(files, fileType);
} else {
return fileUploadService.upload(files, dir, fileType);
fileUploadService.upload(files, dir, fileType);
}
return Result.succeed();
}
/**
......@@ -82,10 +83,11 @@ public class FileUploadController {
* @return {@link Result}
*/
@PostMapping(value = "hdfs")
public Result uploadHdfs(
public Result<Void> uploadHdfs(
@RequestPart("files") MultipartFile[] files,
@RequestParam(value = "dir", defaultValue = "", required = false) String dir,
@RequestParam(value = "hadoopConfigPath", required = false) String hadoopConfigPath) {
return fileUploadService.uploadHdfs(files, dir, hadoopConfigPath);
fileUploadService.uploadHdfs(files, dir, hadoopConfigPath);
return Result.succeed();
}
}
......@@ -19,17 +19,75 @@
package org.dinky.exception;
import cn.hutool.core.exceptions.ExceptionUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
/**
* BusException
*
* @author wenmo
* @since 2021/5/28 14:21
*/
@Slf4j
@Getter
@Setter
public class BusException extends RuntimeException {
private static final long serialVersionUID = -2955156471454043812L;
/** 异常信息的code码 */
private String code;
/** 如果有值得话,将不会取i18n里面的错误信息 */
private String msg;
/** 异常信息的参数 */
private Object[] errorArgs;
public BusException(String message) {
super(message);
setMsg(message);
}
public BusException(String message, Object... args) {
super();
setCode(message);
setErrorArgs(args);
}
/**
* An exception that gets the error message through i 18n
*
* @param code code
* @param e e
* @return {@link BusException}
*/
public static BusException valueOf(String code, Throwable e) {
String errMsg = ExceptionUtil.stacktraceToString(e);
log.error(errMsg);
return new BusException(code, errMsg);
}
/**
* An exception that gets the error message through i 18n
*
* @param code code
* @param errorArgs errorArgs
* @return {@link BusException}
*/
public static BusException valueOf(String code, Object... errorArgs) {
return new BusException(code, errorArgs);
}
/**
* Without passing the exception to i 18n, it is directly returned to the msg past
*
* @param msg msg
* @return {@link BusException}
*/
public static BusException valueOfMsg(String msg) {
return new BusException(msg);
}
}
......@@ -19,7 +19,6 @@
package org.dinky.service;
import org.dinky.common.result.Result;
import org.dinky.constant.UploadFileConstant;
import org.springframework.web.multipart.MultipartFile;
......@@ -32,18 +31,16 @@ public interface FileUploadService {
*
* @param file {@link MultipartFile} instance
* @param fileType Upload file's type, refer ${@link UploadFileConstant}
* @return {@link Result}
*/
Result upload(MultipartFile file, Byte fileType);
void upload(MultipartFile file, Byte fileType);
/**
* Upload multy file, if target file exists, will delete it first
*
* @param files {@link MultipartFile} instance
* @param fileType Upload file's type, refer ${@link UploadFileConstant}
* @return {@link Result}
*/
Result upload(MultipartFile[] files, Byte fileType);
void upload(MultipartFile[] files, Byte fileType);
/**
* Upload one file, if target file exists, will delete it first
......@@ -51,9 +48,8 @@ public interface FileUploadService {
* @param file {@link MultipartFile} instance
* @param dir Local absolute dir
* @param fileType Upload file's type, refer ${@link UploadFileConstant}
* @return {@link Result}
*/
Result upload(MultipartFile file, String dir, Byte fileType);
void upload(MultipartFile file, String dir, Byte fileType);
/**
* Upload multy file, if target file exists, will delete it first
......@@ -61,25 +57,24 @@ public interface FileUploadService {
* @param files {@link MultipartFile} instance
* @param dir Local absolute dir
* @param fileType Upload file's type, refer ${@link UploadFileConstant}
* @return {@link Result}
*/
Result upload(MultipartFile[] files, String dir, Byte fileType);
void upload(MultipartFile[] files, String dir, Byte fileType);
/**
* Upload one hdfs file, if target file exists, will delete it first
*
* @param file {@link MultipartFile} instance
* @param hadoopConfigPath core-site.xml,hdfs-site.xml,yarn-site.xml
* @return {@link Result}
* @param dir dir
*/
Result uploadHdfs(MultipartFile file, String dir, String hadoopConfigPath);
void uploadHdfs(MultipartFile file, String dir, String hadoopConfigPath);
/**
* Upload multy hdfs file, if target file exists, will delete it first
*
* @param files {@link MultipartFile} instance
* @param hadoopConfigPath core-site.xml,hdfs-site.xml,yarn-site.xml
* @return {@link Result}
* @param dir dir
*/
Result uploadHdfs(MultipartFile[] files, String dir, String hadoopConfigPath);
void uploadHdfs(MultipartFile[] files, String dir, String hadoopConfigPath);
}
......@@ -20,9 +20,8 @@
package org.dinky.service.impl;
import org.dinky.assertion.Asserts;
import org.dinky.common.result.Result;
import org.dinky.constant.UploadFileConstant;
import org.dinky.model.CodeEnum;
import org.dinky.exception.BusException;
import org.dinky.service.FileUploadService;
import org.dinky.service.UploadFileRecordService;
import org.dinky.utils.FilePathUtil;
......@@ -39,7 +38,6 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.io.FileUtil;
import lombok.extern.slf4j.Slf4j;
......@@ -51,7 +49,7 @@ public class FileUploadServiceImpl implements FileUploadService {
@Resource private UploadFileRecordService uploadFileRecordService;
@Override
public Result<Void> upload(MultipartFile file, String dir, Byte fileType) {
public void upload(MultipartFile file, String dir, Byte fileType) {
byte target = getTarget(dir, fileType);
if (Objects.equals(target, UploadFileConstant.TARGET_LOCAL)) {
FileUtil.mkdir(dir);
......@@ -69,118 +67,98 @@ public class FileUploadServiceImpl implements FileUploadService {
filePath,
fileType,
UploadFileConstant.TARGET_LOCAL)) {
return Result.succeed("上传成功");
return;
} else {
return Result.failed("数据库异常");
throw BusException.valueOfMsg("数据库异常");
}
} catch (IOException e) {
log.error(
"File "
+ file.getOriginalFilename()
+ " upload to local dir fail, exception is:\n"
+ ExceptionUtil.stacktraceToString(e));
return Result.failed("上传失败");
throw BusException.valueOf("file.upload.failed", e);
}
}
case UploadFileConstant.TARGET_HDFS:
{
Result result = HdfsUtil.uploadFile(filePath, file);
if (Objects.equals(result.getCode(), CodeEnum.SUCCESS.getCode())) {
if (uploadFileRecordService.saveOrUpdateFile(
file.getOriginalFilename(),
dir,
filePath,
fileType,
UploadFileConstant.TARGET_HDFS)) {
return Result.succeed("上传成功");
} else {
return Result.failed("数据库异常");
}
HdfsUtil.uploadFile(filePath, file);
if (uploadFileRecordService.saveOrUpdateFile(
file.getOriginalFilename(),
dir,
filePath,
fileType,
UploadFileConstant.TARGET_HDFS)) {
return;
} else {
return result;
throw BusException.valueOfMsg("数据库异常");
}
}
default:
return Result.failed("非法的上传文件目的地");
throw BusException.valueOfMsg("非法的上传文件目的地");
}
}
@Override
public Result upload(MultipartFile file, Byte fileType) {
public void upload(MultipartFile file, Byte fileType) {
String dir = UploadFileConstant.getDirPath(fileType);
if (StringUtils.isEmpty(dir)) {
return Result.failed("非法的上传文件类型");
throw BusException.valueOfMsg("非法的上传文件类型");
}
return upload(file, dir, fileType);
upload(file, dir, fileType);
}
@Override
public Result upload(MultipartFile[] files, String dir, Byte fileType) {
public void upload(MultipartFile[] files, String dir, Byte fileType) {
if (StringUtils.isEmpty(dir)) {
throw BusException.valueOfMsg("非法的上传文件类型");
}
if (files.length > 0) {
for (MultipartFile file : files) {
Result uploadResult = upload(file, dir, fileType);
if (Objects.equals(uploadResult.getCode(), CodeEnum.ERROR.getCode())) {
return uploadResult;
}
upload(file, dir, fileType);
}
if (!uploadFileRecordService.saveOrUpdateDir(dir, fileType, getTarget(dir, fileType))) {
return Result.failed("数据库异常");
throw BusException.valueOfMsg("数据库异常");
}
return Result.succeed("全部上传成功");
} else {
return Result.succeed("没有检测到要上传的文件");
throw BusException.valueOfMsg("没有检测到要上传的文件");
}
}
@Override
public Result uploadHdfs(MultipartFile file, String dir, String hadoopConfigPath) {
public void uploadHdfs(MultipartFile file, String dir, String hadoopConfigPath) {
if (Asserts.isNullString(dir)) {
dir = UploadFileConstant.getDirPath(UploadFileConstant.FLINK_LIB_ID);
}
String filePath = FilePathUtil.addFileSeparator(dir) + file.getOriginalFilename();
Result result = HdfsUtil.uploadFile(filePath, file, hadoopConfigPath);
if (Objects.equals(result.getCode(), CodeEnum.SUCCESS.getCode())) {
if (uploadFileRecordService.saveOrUpdateFile(
file.getOriginalFilename(),
dir,
filePath,
UploadFileConstant.FLINK_LIB_ID,
UploadFileConstant.TARGET_HDFS)) {
return Result.succeed("上传成功");
} else {
return Result.failed("数据库异常");
}
} else {
return result;
HdfsUtil.uploadFile(filePath, file, hadoopConfigPath);
if (!uploadFileRecordService.saveOrUpdateFile(
file.getOriginalFilename(),
dir,
filePath,
UploadFileConstant.FLINK_LIB_ID,
UploadFileConstant.TARGET_HDFS)) {
throw BusException.valueOfMsg("数据库异常");
}
}
@Override
public Result uploadHdfs(MultipartFile[] files, String dir, String hadoopConfigPath) {
if (Asserts.isNullString(dir)) {
dir = UploadFileConstant.getDirPath(UploadFileConstant.FLINK_LIB_ID);
}
if (files.length > 0) {
for (MultipartFile file : files) {
Result uploadResult = uploadHdfs(file, dir, hadoopConfigPath);
if (Objects.equals(uploadResult.getCode(), CodeEnum.ERROR.getCode())) {
return uploadResult;
public void uploadHdfs(MultipartFile[] files, String dir, String hadoopConfigPath) {
if (Asserts.isNotNull(files)) {
try {
for (MultipartFile file : files) {
uploadHdfs(file, dir, hadoopConfigPath);
}
if (!uploadFileRecordService.saveOrUpdateDir(
dir, UploadFileConstant.FLINK_LIB_ID, UploadFileConstant.TARGET_HDFS)) {
throw BusException.valueOfMsg("数据库异常");
}
} catch (Exception e) {
throw BusException.valueOf("unknown.error", e);
}
if (!uploadFileRecordService.saveOrUpdateDir(
dir, UploadFileConstant.FLINK_LIB_ID, UploadFileConstant.TARGET_HDFS)) {
return Result.failed("数据库异常");
}
return Result.succeed("全部上传成功");
} else {
return Result.succeed("没有检测到要上传的文件");
}
}
@Override
public Result upload(MultipartFile[] files, Byte fileType) {
public void upload(MultipartFile[] files, Byte fileType) {
String dir = UploadFileConstant.getDirPath(fileType);
if (StringUtils.isEmpty(dir)) {
return Result.failed("非法的上传文件类型");
}
return upload(files, dir, fileType);
upload(files, dir, fileType);
}
/**
......
......@@ -20,9 +20,8 @@
package org.dinky.utils;
import org.dinky.assertion.Asserts;
import org.dinky.common.result.Result;
import org.dinky.constant.UploadFileConstant;
import org.dinky.model.CodeEnum;
import org.dinky.exception.BusException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataOutputStream;
......@@ -31,7 +30,6 @@ import org.apache.hadoop.fs.Path;
import java.io.File;
import java.io.IOException;
import java.util.Objects;
import org.springframework.web.multipart.MultipartFile;
......@@ -42,48 +40,33 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
public class HdfsUtil {
private static FileSystem hdfs = null;
/**
* Init internal hdfs client
*
* @param hadoopConfigPath HDFS config path
*/
private static Result init(String hadoopConfigPath) {
if (hdfs == null) {
if (Asserts.isNullString(hadoopConfigPath)) {
hadoopConfigPath =
FilePathUtil.removeFileSeparator(UploadFileConstant.HADOOP_CONF_DIR);
}
String coreSiteFilePath = hadoopConfigPath + "/core-site.xml";
String hdfsSiteFilePath = hadoopConfigPath + "/hdfs-site.xml";
if (!new File(coreSiteFilePath).exists() || !new File(hdfsSiteFilePath).exists()) {
return Result.failed(
"在项目根目录下没有找到 core-site.xml/hdfs-site.xml/yarn-site.xml 文件,请先上传这些文件");
}
try {
final Configuration configuration = new Configuration();
configuration.addResource(new Path(coreSiteFilePath));
configuration.addResource(new Path(hdfsSiteFilePath));
hdfs = FileSystem.get(configuration);
} catch (IOException e) {
log.error(ExceptionUtil.stacktraceToString(e));
return Result.failed("内部 hdfs 客户端初始化错误");
}
return Result.succeed("hdfs 客户端初始化成功");
private static FileSystem init(String hadoopConfigPath) {
FileSystem hdfs;
if (Asserts.isNullString(hadoopConfigPath)) {
hadoopConfigPath = FilePathUtil.removeFileSeparator(UploadFileConstant.HADOOP_CONF_DIR);
}
return Result.succeed("");
}
/**
* Upload file byte content to HDFS
*
* @param path HDFS path
* @param bytes File byte content
* @return {@link Result}
*/
public static Result uploadFile(String path, byte[] bytes) {
return uploadFile(path, bytes, null);
String coreSiteFilePath = hadoopConfigPath + "/core-site.xml";
String hdfsSiteFilePath = hadoopConfigPath + "/hdfs-site.xml";
if (!new File(coreSiteFilePath).exists() || !new File(hdfsSiteFilePath).exists()) {
throw BusException.valueOf("hdfs.file.lose");
}
try {
final Configuration configuration = new Configuration();
configuration.addResource(new Path(coreSiteFilePath));
configuration.addResource(new Path(hdfsSiteFilePath));
hdfs = FileSystem.get(configuration);
} catch (IOException e) {
String msg = ExceptionUtil.stacktraceToString(e);
log.error(msg);
throw BusException.valueOf("hdfs.init.failed", e);
}
log.info("hdfs client initialized successfully");
return hdfs;
}
/**
......@@ -92,21 +75,14 @@ public class HdfsUtil {
* @param path HDFS path
* @param bytes File byte content
* @param hadoopConfigPath hdfs config path
* @return {@link Result}
*/
public static Result uploadFile(String path, byte[] bytes, String hadoopConfigPath) {
Result initResult = init(hadoopConfigPath);
if (Objects.equals(initResult.getCode(), CodeEnum.SUCCESS.getCode())) {
try (FSDataOutputStream stream = hdfs.create(new Path(path), true)) {
stream.write(bytes);
stream.flush();
return Result.succeed("");
} catch (IOException e) {
log.error(ExceptionUtil.stacktraceToString(e));
return Result.failed("文件上传失败");
}
} else {
return initResult;
public static void uploadFile(String path, byte[] bytes, String hadoopConfigPath) {
try (FileSystem hdfs = init(hadoopConfigPath);
FSDataOutputStream stream = hdfs.create(new Path(path), true)) {
stream.write(bytes);
stream.flush();
} catch (IOException e) {
throw BusException.valueOf("file.upload.failed", e);
}
}
......@@ -115,14 +91,12 @@ public class HdfsUtil {
*
* @param path HDFS path
* @param file MultipartFile instance
* @return {@link Result}
*/
public static Result uploadFile(String path, MultipartFile file) {
public static void uploadFile(String path, MultipartFile file) {
try {
return uploadFile(path, file.getBytes());
uploadFile(path, file.getBytes(), null);
} catch (IOException e) {
log.error(ExceptionUtil.stacktraceToString(e));
return Result.failed("文件上传失败");
throw BusException.valueOf("file.upload.failed", e);
}
}
......@@ -132,14 +106,12 @@ public class HdfsUtil {
* @param path HDFS path
* @param file MultipartFile instance
* @param hadoopConfigPath hdfs config path
* @return {@link Result}
*/
public static Result uploadFile(String path, MultipartFile file, String hadoopConfigPath) {
public static void uploadFile(String path, MultipartFile file, String hadoopConfigPath) {
try {
return uploadFile(path, file.getBytes(), hadoopConfigPath);
uploadFile(path, file.getBytes(), hadoopConfigPath);
} catch (IOException e) {
log.error(ExceptionUtil.stacktraceToString(e));
return Result.failed("文件上传失败");
throw BusException.valueOf("file.upload.failed", e);
}
}
}
......@@ -21,7 +21,6 @@ package org.dinky.utils;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
......@@ -30,7 +29,7 @@ import cn.hutool.extra.spring.SpringUtil;
/** desc: 获取i18n资源文件 */
public class MessageResolverUtils {
@Autowired private static MessageSource messageSource = SpringUtil.getBean(MessageSource.class);
private static MessageSource messageSource = SpringUtil.getBean(MessageSource.class);
public MessageResolverUtils() {}
......@@ -54,9 +53,7 @@ public class MessageResolverUtils {
*/
public static String getMessages(Object code, Object... messageArgs) {
Object[] objs = Arrays.stream(messageArgs).map(MessageResolverUtils::getMessage).toArray();
String message =
messageSource.getMessage(
code.toString(), objs, code.toString(), LocaleContextHolder.getLocale());
return message;
return messageSource.getMessage(
code.toString(), objs, code.toString(), LocaleContextHolder.getLocale());
}
}
......@@ -16,65 +16,73 @@
#
#
unknown.i18n=未知的国际化信息,请检查。。。
unknown.i18n=\u672A\u77E5\u7684\u56FD\u9645\u5316\u4FE1\u606F\uFF0C\u8BF7\u68C0\u67E5\u3002\u3002\u3002
# base crud messages
modify.success=修改成功
modify.failed=修改失败
delete.success=删除成功
delete.failed=删除失败
delete.partially.success=删除部分成功,但 {0} 删除失败,共 {1} 次失败。
delete.placeholder=请选择要删除的记录
create.success=新增成功
create.failed=新增失败
modify.success=\u4FEE\u6539\u6210\u529F
modify.failed=\u4FEE\u6539\u5931\u8D25
delete.success=\u5220\u9664\u6210\u529F
delete.failed=\u5220\u9664\u5931\u8D25
delete.partially.success=\u5220\u9664\u90E8\u5206\u6210\u529F\uFF0C\u4F46 {0} \u5220\u9664\u5931\u8D25\uFF0C\u5171 {1} \u6B21\u5931\u8D25\u3002
delete.placeholder=\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u8BB0\u5F55
create.success=\u65B0\u589E\u6210\u529F
create.failed=\u65B0\u589E\u5931\u8D25
# response messages
request.params.error=请求参数错误
response.get.success=获取成功
response.get.failed=获取失败
response.send.success=发送成功
response.send.failed=发送失败
response.execute.success=执行成功
response.execute.failed=执行失败
response.restart.success=重启成功
response.restart.failed=重启失败
response.test.connect.success=测试链接成功
response.test.connect.failed=测试链接失败
request.params.error=\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF
response.get.success=\u83B7\u53D6\u6210\u529F
response.get.failed=\u83B7\u53D6\u5931\u8D25
response.send.success=\u53D1\u9001\u6210\u529F
response.send.failed=\u53D1\u9001\u5931\u8D25
response.execute.success=\u6267\u884C\u6210\u529F
response.execute.failed=\u6267\u884C\u5931\u8D25
response.restart.success=\u91CD\u542F\u6210\u529F
response.restart.failed=\u91CD\u542F\u5931\u8D25
response.test.connect.success=\u6D4B\u8BD5\u94FE\u63A5\u6210\u529F
response.test.connect.failed=\u6D4B\u8BD5\u94FE\u63A5\u5931\u8D25
# validation messages
error.param.empty={0}不能为空
error.param.invalid={0}无效
error.param.occupied={0}已被占用
error.param.empty={0}\u4E0D\u80FD\u4E3A\u7A7A
error.param.invalid={0}\u65E0\u6548
error.param.occupied={0}\u5DF2\u88AB\u5360\u7528
# login messages
login.fail=登录失败,用户名或密码错误
login.not.login=用户未登录,请先登录
login.session.timeout=会话已过期,请重新登录。
login.success=登录成功
login.password.notnull=密码不能为空
login.user.not.exists=账号不存在
login.user.disabled=账号已被禁用
outlogin.success=退出成功
login.fail=\u767B\u5F55\u5931\u8D25,\u7528\u6237\u540D\u6216\u5BC6\u7801\u9519\u8BEF
login.not.login=\u7528\u6237\u672A\u767B\u5F55\uFF0C\u8BF7\u5148\u767B\u5F55
login.session.timeout=\u4F1A\u8BDD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002
login.success=\u767B\u5F55\u6210\u529F
login.password.notnull=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
login.user.not.exists=\u8D26\u53F7\u4E0D\u5B58\u5728
login.user.disabled=\u8D26\u53F7\u5DF2\u88AB\u7981\u7528
outlogin.success=\u9000\u51FA\u6210\u529F
# user messages
user.oldpassword.incorrect=旧密码不正确
user.change.password.success=密码修改成功
user.change.password.failed=密码修改失败
user.register.account.exists=该账户已存在
user.register.success=注册成功
user.oldpassword.incorrect=\u65E7\u5BC6\u7801\u4E0D\u6B63\u786E
user.change.password.success=\u5BC6\u7801\u4FEE\u6539\u6210\u529F
user.change.password.failed=\u5BC6\u7801\u4FEE\u6539\u5931\u8D25
user.register.account.exists=\u8BE5\u8D26\u6237\u5DF2\u5B58\u5728
user.register.success=\u6CE8\u518C\u6210\u529F
message.welcome=\u6B22\u8FCE\u4F7F\u7528 Dinky
message.task.running=\u4EFB\u52A1\u5DF2\u5728\u8FD0\u884C
base.not.exists={0} \u4E0D\u5B58\u5728
task.project.exists=\u5DE5\u7A0B\u5DF2\u5B58\u5728
task.project.upload.success=\u4E0A\u4F20zip\u5305\u5E76\u521B\u5EFA\u5DE5\u7A0B\u6210\u529F
task.delete.partially.success=\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u4F5C\u4E1A {0} \u72B6\u6001\u3002
task.move.success=\u79FB\u52A8\u6210\u529F
task.move.failed=\u79FB\u52A8\u5931\u8D25
task.copy.success=\u590D\u5236\u4F5C\u4E1A\u6210\u529F
task.copy.failed=\u590D\u5236\u4F5C\u4E1A\u5931\u8D25
message.welcome=欢迎使用 Dinky
message.task.running=任务已在运行
base.not.exists={0} 不存在
file.upload.failed=\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A{0}
task.project.exists=工程已存在
task.project.upload.success=上传zip包并创建工程成功
task.delete.partially.success=删除失败,请检查作业 {0} 状态。
task.move.success=移动成功
task.move.failed=移动失败
task.copy.success=复制作业成功
task.copy.failed=复制作业失败
hdfs.init.failed=\u5185\u90E8 hdfs \u5BA2\u6237\u7AEF\u521D\u59CB\u5316\u9519\u8BEF\uFF0C\u539F\u56E0\uFF1A{0}
hdfs.file.lose=\u5728\u9879\u76EE\u6839\u76EE\u5F55\u4E0B\u6CA1\u6709\u627E\u5230 core-site.xml/hdfs-site.xml/yarn-site.xml \u6587\u4EF6\uFF0C\u8BF7\u5148\u4E0A\u4F20\u8FD9\u4E9B\u6587\u4EF6
unknown.error=\u672A\u77E5\u5F02\u5E38\uFF1A{0}
operate.success=\u64CD\u4F5C\u6210\u529F
......@@ -75,4 +75,13 @@ task.delete.partially.success=Delete failed, please check job {0} status.
task.move.success=Move successfully
task.move.failed=Move failed
task.copy.success=Copy job succeeded
task.copy.failed = Copy job failed
\ No newline at end of file
task.copy.failed = Copy job failed
file.upload.failed=File upload failed because: {0}
hdfs.init.failed=Internal HDFS client initialization error due to:{0}
hdfs.file.lose=If you can't find the core-site.xml/hdfs-site.xml/yarn-site.xml file in the root directory of the project, upload them first
unknown.error=Unknown error: {0}
operate.success=operate success
\ No newline at end of file
......@@ -16,65 +16,73 @@
#
#
unknown.i18n=未知的国际化信息,请检查。。。
unknown.i18n=\u672A\u77E5\u7684\u56FD\u9645\u5316\u4FE1\u606F\uFF0C\u8BF7\u68C0\u67E5\u3002\u3002\u3002
# base crud messages
modify.success=修改成功
modify.failed=修改失败
delete.success=删除成功
delete.failed=删除失败
delete.partially.success=删除部分成功,但 {0} 删除失败,共 {1} 次失败。
delete.placeholder=请选择要删除的记录
create.success=新增成功
create.failed=新增失败
modify.success=\u4FEE\u6539\u6210\u529F
modify.failed=\u4FEE\u6539\u5931\u8D25
delete.success=\u5220\u9664\u6210\u529F
delete.failed=\u5220\u9664\u5931\u8D25
delete.partially.success=\u5220\u9664\u90E8\u5206\u6210\u529F\uFF0C\u4F46 {0} \u5220\u9664\u5931\u8D25\uFF0C\u5171 {1} \u6B21\u5931\u8D25\u3002
delete.placeholder=\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u8BB0\u5F55
create.success=\u65B0\u589E\u6210\u529F
create.failed=\u65B0\u589E\u5931\u8D25
# response messages
request.params.error=请求参数错误
response.get.success=获取成功
response.get.failed=获取失败
response.send.success=发送成功
response.send.failed=发送失败
response.execute.success=执行成功
response.execute.failed=执行失败
response.restart.success=重启成功
response.restart.failed=重启失败
response.test.connect.success=测试链接成功
response.test.connect.failed=测试链接失败
request.params.error=\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF
response.get.success=\u83B7\u53D6\u6210\u529F
response.get.failed=\u83B7\u53D6\u5931\u8D25
response.send.success=\u53D1\u9001\u6210\u529F
response.send.failed=\u53D1\u9001\u5931\u8D25
response.execute.success=\u6267\u884C\u6210\u529F
response.execute.failed=\u6267\u884C\u5931\u8D25
response.restart.success=\u91CD\u542F\u6210\u529F
response.restart.failed=\u91CD\u542F\u5931\u8D25
response.test.connect.success=\u6D4B\u8BD5\u94FE\u63A5\u6210\u529F
response.test.connect.failed=\u6D4B\u8BD5\u94FE\u63A5\u5931\u8D25
# validation messages
error.param.empty={0}不能为空
error.param.invalid={0}无效
error.param.occupied={0}已被占用
error.param.empty={0}\u4E0D\u80FD\u4E3A\u7A7A
error.param.invalid={0}\u65E0\u6548
error.param.occupied={0}\u5DF2\u88AB\u5360\u7528
# login messages
login.fail=登录失败,用户名或密码错误
login.not.login=用户未登录,请先登录
login.session.timeout=会话已过期,请重新登录。
login.success=登录成功
login.password.notnull=密码不能为空
login.user.not.exists=账号不存在
login.user.disabled=账号已被禁用
outlogin.success=退出成功
login.fail=\u767B\u5F55\u5931\u8D25,\u7528\u6237\u540D\u6216\u5BC6\u7801\u9519\u8BEF
login.not.login=\u7528\u6237\u672A\u767B\u5F55\uFF0C\u8BF7\u5148\u767B\u5F55
login.session.timeout=\u4F1A\u8BDD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002
login.success=\u767B\u5F55\u6210\u529F
login.password.notnull=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
login.user.not.exists=\u8D26\u53F7\u4E0D\u5B58\u5728
login.user.disabled=\u8D26\u53F7\u5DF2\u88AB\u7981\u7528
outlogin.success=\u9000\u51FA\u6210\u529F
# user messages
user.oldpassword.incorrect=旧密码不正确
user.change.password.success=密码修改成功
user.change.password.failed=密码修改失败
user.register.account.exists=该账户已存在
user.register.success=注册成功
user.oldpassword.incorrect=\u65E7\u5BC6\u7801\u4E0D\u6B63\u786E
user.change.password.success=\u5BC6\u7801\u4FEE\u6539\u6210\u529F
user.change.password.failed=\u5BC6\u7801\u4FEE\u6539\u5931\u8D25
user.register.account.exists=\u8BE5\u8D26\u6237\u5DF2\u5B58\u5728
user.register.success=\u6CE8\u518C\u6210\u529F
message.welcome=\u6B22\u8FCE\u4F7F\u7528 Dinky
message.task.running=\u4EFB\u52A1\u5DF2\u5728\u8FD0\u884C
base.not.exists={0} \u4E0D\u5B58\u5728
task.project.exists=\u5DE5\u7A0B\u5DF2\u5B58\u5728
task.project.upload.success=\u4E0A\u4F20zip\u5305\u5E76\u521B\u5EFA\u5DE5\u7A0B\u6210\u529F
task.delete.partially.success=\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u4F5C\u4E1A {0} \u72B6\u6001\u3002
task.move.success=\u79FB\u52A8\u6210\u529F
task.move.failed=\u79FB\u52A8\u5931\u8D25
task.copy.success=\u590D\u5236\u4F5C\u4E1A\u6210\u529F
task.copy.failed=\u590D\u5236\u4F5C\u4E1A\u5931\u8D25
message.welcome=欢迎使用 Dinky
message.task.running=任务已在运行
base.not.exists={0} 不存在
file.upload.failed=\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A{0}
task.project.exists=工程已存在
task.project.upload.success=上传zip包并创建工程成功
task.delete.partially.success=删除失败,请检查作业 {0} 状态。
task.move.success=移动成功
task.move.failed=移动失败
task.copy.success=复制作业成功
task.copy.failed=复制作业失败
hdfs.init.failed=\u5185\u90E8 hdfs \u5BA2\u6237\u7AEF\u521D\u59CB\u5316\u9519\u8BEF\uFF0C\u539F\u56E0\uFF1A{0}
hdfs.file.lose=\u5728\u9879\u76EE\u6839\u76EE\u5F55\u4E0B\u6CA1\u6709\u627E\u5230 core-site.xml/hdfs-site.xml/yarn-site.xml \u6587\u4EF6\uFF0C\u8BF7\u5148\u4E0A\u4F20\u8FD9\u4E9B\u6587\u4EF6
unknown.error=\u672A\u77E5\u5F02\u5E38\uFF1A{0}
operate.success=\u64CD\u4F5C\u6210\u529F
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment