Review Board 1.7.22


SQOOP-648 Moving localizable strings to resources and consolidate all String constants to Constants.java

Review Request #8305 - Created Dec. 1, 2012 and updated

Venkat Ranganathan
Reviewers
Sqoop
jarcec
sqoop-sqoop2
I have moved localizable strings to the client resources (those that are descriptions, messages in general etc).  Also consolidated constants to one place and removed repetitive occurrences.   

4 more files in utils need to be updated, but wanted to get this reviewed and take that after this
Ran the SQOOP2 client tests and manually ran various client commands to make sure that all commands have their localizable strings and constants properly displayed apart from running all the unit tests.   No new tests were added

Diff revision 6 (Latest)

1 2 3 4 5 6
1 2 3 4 5 6

  1. client/src/main/java/org/apache/sqoop/client/core/Constants.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/CloneCommand.java: Loading...
  3. client/src/main/java/org/apache/sqoop/client/shell/CloneConnectionFunction.java: Loading...
  4. client/src/main/java/org/apache/sqoop/client/shell/CloneJobFunction.java: Loading...
  5. client/src/main/java/org/apache/sqoop/client/shell/CreateCommand.java: Loading...
  6. client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java: Loading...
  7. client/src/main/java/org/apache/sqoop/client/shell/CreateJobFunction.java: Loading...
  8. client/src/main/java/org/apache/sqoop/client/shell/DeleteCommand.java: Loading...
  9. client/src/main/java/org/apache/sqoop/client/shell/DeleteConnectionFunction.java: Loading...
  10. client/src/main/java/org/apache/sqoop/client/shell/DeleteJobFunction.java: Loading...
  11. client/src/main/java/org/apache/sqoop/client/shell/HelpCommand.java: Loading...
  12. client/src/main/java/org/apache/sqoop/client/shell/SetCommand.java: Loading...
  13. client/src/main/java/org/apache/sqoop/client/shell/SetOptionFunction.java: Loading...
  14. client/src/main/java/org/apache/sqoop/client/shell/SetServerFunction.java: Loading...
  15. client/src/main/java/org/apache/sqoop/client/shell/ShowCommand.java: Loading...
  16. client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java: Loading...
  17. client/src/main/java/org/apache/sqoop/client/shell/ShowConnectorFunction.java: Loading...
  18. client/src/main/java/org/apache/sqoop/client/shell/ShowFrameworkFunction.java: Loading...
  19. client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java: Loading...
  20. client/src/main/java/org/apache/sqoop/client/shell/ShowServerFunction.java: Loading...
This diff has been split across 2 pages: 1 2 >
client/src/main/java/org/apache/sqoop/client/core/Constants.java
Revision 47c0547 New Change
[20] 19 lines
[+20]
20
/**
20
/**
21
 *
21
 *
22
 */
22
 */
23
public class Constants {
23
public class Constants {
24

    
   
24

   

    
   
25
  // General string constants
25
  public static final String RESOURCE_NAME = "client-resource";
26
  public static final String RESOURCE_NAME = "client-resource";

    
   
27
  public static final String BOLD_STR_SEQUENCE = "@|bold";

    
   
28
  public static final String END_STR_SEQUENCE = "|@";

    
   
29
  // Options
26

    
   
30

   

    
   
31
  public static final String OPT_XID = "xid";

    
   
32
  public static final String OPT_ALL = "all";

    
   
33
  public static final String OPT_JID = "jid";

    
   
34
  public static final String OPT_CID = "cid";

    
   
35
  public static final String OPT_TYPE = "type";

    
   
36
  public static final String OPT_NAME = "name";

    
   
37
  public static final String OPT_VALUE = "value";

    
   
38
  public static final String OPT_VERBOSE = "verbose";

    
   
39
  public static final String OPT_HOST = "host";

    
   
40
  public static final String OPT_PORT = "port";

    
   
41
  public static final String OPT_WEBAPP = "webapp";

    
   
42
  public static final String OPT_SERVER = "server";

    
   
43
  public static final String OPT_CLIENT = "client";

    
   
44
  public static final String OPT_PROTOCOL = "protocol";

    
   
45

   

    
   
46
  public static final char OPT_XID_CHAR = 'x';

    
   
47
  public static final char OPT_ALL_CHAR = 'a';

    
   
48
  public static final char OPT_JID_CHAR = 'j';

    
   
49
  public static final char OPT_CID_CHAR = 'c';

    
   
50
  public static final char OPT_TYPE_CHAR = 't';

    
   
51
  public static final char OPT_NAME_CHAR = 'n';

    
   
52
  public static final char OPT_VALUE_CHAR = 'v';

    
   
53
  public static final char OPT_HOST_CHAR = 'h';

    
   
54
  public static final char OPT_PORT_CHAR = 'p';

    
   
55
  public static final char OPT_WEBAPP_CHAR = 'w';

    
   
56
  public static final char OPT_SERVER_CHAR = 's';

    
   
57
  public static final char OPT_CLIENT_CHAR = 'c';

    
   
58
  public static final char OPT_PROTOCOL_CHAR = 'p';

    
   
59

   

    
   
60

   

    
   
61

   

    
   
62
  // Resource keys for various commands, command options,

    
   
63
  // functions and descriptions

    
   
64
  public static final String CMD_CLONE = "clone";

    
   
65
  public static final String CMD_CLONE_SC = "\\cl";

    
   
66

   

    
   
67
  public static final String CMD_CREATE = "create";

    
   
68
  public static final String CMD_CREATE_SC = "\\cr";

    
   
69

   

    
   
70
  public static final String CMD_DELETE = "delete";

    
   
71
  public static final String CMD_DELETE_SC = "\\d";

    
   
72

   

    
   
73
  public static final String CMD_HELP = "help";

    
   
74
  public static final String CMD_HELP_SC = "\\h";

    
   
75

   

    
   
76
  public static final String CMD_SET = "set";

    
   
77
  public static final String CMD_SET_SC = "\\st";

    
   
78

   

    
   
79
  public static final String CMD_SHOW = "show";

    
   
80
  public static final String CMD_SHOW_SC = "\\sh";

    
   
81

   

    
   
82
  public static final String CMD_SUBMISSION = "submit";

    
   
83
  public static final String CMD_SUBMISSION_SC = "\\sub";

    
   
84

   

    
   
85
  public static final String CMD_UPDATE = "update";

    
   
86
  public static final String CMD_UPDATE_SC = "\\up";

    
   
87

   

    
   
88
  public static final String FN_CONNECTION = "connection";

    
   
89
  public static final String FN_JOB = "job";

    
   
90
  public static final String FN_SERVER = "server";

    
   
91
  public static final String FN_OPTION = "option";

    
   
92
  public static final String FN_CONNECTOR = "connector";

    
   
93
  public static final String FN_VERSION = "version";

    
   
94
  public static final String FN_FRAMEWORK = "framework";

    
   
95
  public static final String FN_START = "start";

    
   
96
  public static final String FN_STOP = "stop";

    
   
97
  public static final String FN_STATUS = "status";

    
   
98

   

    
   
99
  public static final String PRE_CLONE = "Clone";

    
   
100
  public static final String PRE_CREATE = "Create";

    
   
101
  public static final String PRE_DELETE = "Delete";

    
   
102
  public static final String PRE_SET = "Set";

    
   
103
  public static final String PRE_SHOW = "Show";

    
   
104
  public static final String PRE_SUBMISSION = "Submission";

    
   
105
  public static final String PRE_UPDATE = "Update";

    
   
106
  public static final String SUF_INFO = "Info";

    
   
107

   

    
   
108

   

    
   
109
  public static final String PROP_HOMEDIR = "user.home";

    
   
110
  public static final String PROP_CURDIR = "user.dir";

    
   
111
  public static final String SQOOP_PROMPT = "sqoop";

    
   
112

   

    
   
113

   

    
   
114
  // Resource Keys for various messages

    
   
115

   

    
   
116
  public static final String RES_ARGS_XID_MISSING =

    
   
117
      "args.xid_missing";

    
   
118
  public static final String RES_ARGS_JID_MISSING =

    
   
119
      "args.jid_missing";

    
   
120
  public static final String RES_ARGS_CID_MISSING =

    
   
121
      "args.cid_missing";

    
   
122
  public static final String RES_ARGS_TYPE_MISSING =

    
   
123
      "args.type_missing";

    
   
124
  public static final String RES_ARGS_NAME_MISSING =

    
   
125
      "args.name_missing";

    
   
126
  public static final String RES_ARGS_VALUE_MISSING =

    
   
127
      "args.value_missing";

    
   
128

   

    
   
129
  public static final String RES_PROMPT_CONN_ID =

    
   
130
      "prompt.conn_id";

    
   
131
  public static final String RES_PROMPT_JOB_ID =

    
   
132
      "prompt.job_id";

    
   
133
  public static final String RES_CONNECTOR_ID =

    
   
134
      "prompt.connector_id";

    
   
135
  public static final String RES_PROMPT_JOB_TYPE =

    
   
136
      "prompt.job_type";

    
   
137
  public static final String RES_PROMPT_UPDATE_CONN_METADATA =

    
   
138
      "prompt.update_conn_metadata";

    
   
139
  public static final String RES_PROMPT_UPDATE_JOB_METADATA =

    
   
140
      "prompt.update_job_metadata";

    
   
141
  public static final String RES_PROMPT_FILL_CONN_METADATA =

    
   
142
      "prompt.fill_conn_metadata";

    
   
143
  public static final String RES_PROMPT_FILL_JOB_METADATA =

    
   
144
      "prompt.fill_job_metadata";

    
   
145

   

    
   
146

   

    
   
147

   

    
   
148

   

    
   
149
  public static final String RES_CLONE_USAGE =

    
   
150
      "clone.usage";

    
   
151
  public static final String RES_CLONE_CONN_SUCCESSFUL =

    
   
152
      "clone.conn_successful";

    
   
153
  public static final String RES_CLONE_JOB_SUCCESSFUL =

    
   
154
      "clone.job.successful";

    
   
155
  public static final String RES_CLONE_CLONING_CONN =

    
   
156
      "clone.cloning_conn";

    
   
157
  public static final String RES_CLONE_CLONING_JOB =

    
   
158
      "clone.cloning_job";

    
   
159

   

    
   
160

   

    
   
161
  public static final String RES_CREATE_USAGE =

    
   
162
      "create.usage";

    
   
163
  public static final String RES_CREATE_CONN_SUCCESSFUL =

    
   
164
      "create.conn_successful";

    
   
165
  public static final String RES_CREATE_JOB_SUCCESSFUL =

    
   
166
      "create.job_successful";

    
   
167
  public static final String RES_CREATE_CREATING_CONN =

    
   
168
      "create.creating_conn";

    
   
169
  public static final String RES_CREATE_CREATING_JOB =

    
   
170
      "create.creating_job";

    
   
171

   

    
   
172

   

    
   
173
  public static final String RES_DELETE_USAGE =

    
   
174
      "delete.usage";

    
   
175

   

    
   
176
  public static final String RES_HELP_USAGE =

    
   
177
      "help.usage";

    
   
178
  public static final String RES_HELP_DESCRIPTION =

    
   
179
      "help.description";

    
   
180
  public static final String RES_HELP_CMD_USAGE =

    
   
181
      "help.cmd_usage";

    
   
182
  public static final String RES_HELP_MESSAGE =

    
   
183
      "help.message";

    
   
184
  public static final String RES_HELP_INFO =

    
   
185
      "help.info";

    
   
186
  public static final String RES_HELP_AVAIL_COMMANDS =

    
   
187
      "help.avail_commands";

    
   
188
  public static final String RES_HELP_CMD_DESCRIPTION =

    
   
189
      "help.cmd_description";

    
   
190
  public static final String RES_HELP_SPECIFIC_CMD_INFO =

    
   
191
      "help.specific_cmd_info";

    
   
192

   

    
   
193
  public static final String RES_UNRECOGNIZED_CMD =

    
   
194
      "unrecognized.cmd";

    
   
195

   

    
   
196
  public static final String RES_SET_USAGE =

    
   
197
      "set.usage";

    
   
198
  public static final String RES_SET_PROMPT_OPT_NAME =

    
   
199
      "set.prompt_opt_name";

    
   
200
  public static final String RES_SET_PROMPT_OPT_VALUE =

    
   
201
      "set.prompt_opt_value";

    
   
202
  public static final String RES_SET_VERBOSE_CHANGED =

    
   
203
      "set.verbose_changed";

    
   
204
  public static final String RES_SET_UNKNOWN_OPT_IGNORED =

    
   
205
      "set.unknown_opt_ignored";

    
   
206
  public static final String RES_SET_HOST_DESCRIPTION =

    
   
207
      "set.host_description";

    
   
208
  public static final String RES_SET_PORT_DESCRIPTION =

    
   
209
      "set.port_description";

    
   
210
  public static final String RES_WEBAPP_DESCRIPTION =

    
   
211
      "set.webapp_description";

    
   
212
  public static final String RES_SET_SERVER_USAGE =

    
   
213
      "set.server_usage";

    
   
214
  public static final String RES_SET_SERVER_SUCCESSFUL =

    
   
215
      "set.server_successful";

    
   
216

   

    
   
217
  public static final String RES_SHOW_USAGE =

    
   
218
      "show.usage";

    
   
219
  public static final String RES_SHOW_PROMPT_DISPLAY_ALL_CONNS =

    
   
220
      "show.prompt_display_all_conns";

    
   
221
  public static final String RES_SHOW_PROMPT_DISPLAY_CONN_XID =

    
   
222
      "show.prompt_display_conn_xid";

    
   
223
  public static final String RES_SHOW_CONN_USAGE =

    
   
224
      "show.conn_usage";

    
   
225
  public static final String RES_SHOW_PROMPT_CONNS_TO_SHOW =

    
   
226
      "show.prompt_conns_to_show";

    
   
227
  public static final String RES_SHOW_PROMPT_CONN_INFO =

    
   
228
      "show.prompt_conn_info";

    
   
229

   

    
   
230

   

    
   
231
  public static final String RES_SHOW_PROMPT_DISPLAY_ALL_CONNECTORS =

    
   
232
      "show.prompt_display_all_connectors";

    
   
233
  public static final String RES_SHOW_PROMPT_DISPLAY_CONNECTOR_CID =

    
   
234
      "show.prompt_display_connector_cid";

    
   
235
  public static final String RES_SHOW_CONNECTOR_USAGE =

    
   
236
      "show.connector_usage";

    
   
237
  public static final String RES_SHOW_PROMPT_CONNECTORS_TO_SHOW =

    
   
238
      "show.prompt_connectors_to_show";

    
   
239
  public static final String RES_SHOW_PROMPT_CONNECTOR_INFO =

    
   
240
      "show.prompt_connector_info";

    
   
241

   

    
   
242
  public static final String RES_SHOW_FRAMEWORK_USAGE =

    
   
243
      "show.framework_usage";

    
   
244
  public static final String RES_SHOW_PROMPT_FRAMEWORK_OPTS =

    
   
245
      "show.prompt_framework_opts";

    
   
246

   

    
   
247
  public static final String RES_SHOW_PROMPT_DISPLAY_ALL_JOBS =

    
   
248
      "show.prompt_display_all_jobs";

    
   
249
  public static final String RES_SHOW_PROMPT_DISPLAY_JOB_JID =

    
   
250
      "show.prompt_display_job_jid";

    
   
251
  public static final String RES_SHOW_JOB_USAGE =

    
   
252
      "show.job_usage";

    
   
253
  public static final String RES_SHOW_PROMPT_JOBS_TO_SHOW =

    
   
254
      "show.prompt_jobs_to_show";

    
   
255
  public static final String RES_SHOW_PROMPT_JOB_INFO =

    
   
256
      "show.prompt_job_info";

    
   
257

   

    
   
258
  public static final String RES_SHOW_PROMPT_DISPLAY_ALL_SERVERS =

    
   
259
      "show.prompt_display_all_servers";

    
   
260
  public static final String RES_SHOW_PROMPT_DISPLAY_SERVER_HOST =

    
   
261
      "show.prompt_display_server_host";

    
   
262
  public static final String RES_SHOW_PROMPT_DISPLAY_SERVER_PORT =

    
   
263
      "show.prompt_display_server_port";

    
   
264
  public static final String RES_SHOW_PROMPT_DISPLAY_SERVER_WEBAPP =

    
   
265
      "show.prompt_display_server_webapp";

    
   
266
  public static final String RES_SHOW_SERVER_USAGE =

    
   
267
      "show.server_usage";

    
   
268
  public static final String RES_SHOW_PROMPT_SERVER_HOST =

    
   
269
      "show.prompt_server_host";

    
   
270
  public static final String RES_SHOW_PROMPT_SERVER_PORT =

    
   
271
      "show.prompt_server_port";

    
   
272
  public static final String RES_SHOW_PROMPT_SERVER_WEBAPP =

    
   
273
      "show.prompt_server_webapp";

    
   
274

   

    
   
275
  public static final String RES_SHOW_PROMPT_DISPLAY_ALL_VERSIONS =

    
   
276
      "show.prompt_display_all_versions";

    
   
277
  public static final String RES_SHOW_PROMPT_DISPLAY_VERSION_SERVER =

    
   
278
      "show.prompt_display_version_server";

    
   
279
  public static final String RES_SHOW_PROMPT_DISPLAY_VERSION_CLIENT =

    
   
280
      "show.prompt_display_version_client";

    
   
281
  public static final String RES_SHOW_PROMPT_DISPLAY_VERSION_PROTOCOL =

    
   
282
      "show.prompt_display_version_protocol";

    
   
283
  public static final String RES_SHOW_VERSION_USAGE =

    
   
284
      "show.version_usage";

    
   
285
  public static final String RES_SHOW_PROMPT_VERSION_CLIENT_SERVER =

    
   
286
      "show.prompt_version_client_server";

    
   
287
  public static final String RES_SHOW_PROMPT_VERSION_PROTOCOL =

    
   
288
      "show.prompt_version_protocol";

    
   
289

   

    
   
290

   

    
   
291

   

    
   
292
  public static final String RES_SQOOP_SHELL_BANNER =

    
   
293
      "sqoop.shell_banner";

    
   
294
  public static final String RES_SQOOP_PROMPT_SHELL_LOADRC =

    
   
295
      "sqoop.prompt_shell_loadrc";

    
   
296
  public static final String RES_SQOOP_PROMPT_SHELL_LOADEDRC =

    
   
297
      "sqoop.prompt_shell_loadedrc";

    
   
298

   

    
   
299

   

    
   
300
  public static final String RES_SUBMISSION_USAGE =

    
   
301
      "submission.usage";

    
   
302

   

    
   
303

   

    
   
304
  public static final String RES_UPDATE_USAGE =

    
   
305
      "update.usage";

    
   
306
  public static final String RES_UPDATE_UPDATING_CONN =

    
   
307
      "update.updating_conn";

    
   
308
  public static final String RES_UPDATE_CONN_SUCCESSFUL =

    
   
309
      "update.conn_successful";

    
   
310
  public static final String RES_UPDATE_UPDATING_JOB =

    
   
311
      "update.updating_job";

    
   
312
  public static final String RES_UPDATE_JOB_SUCCESSFUL =

    
   
313
      "update.job_successful";
27
  private Constants() {
314
  private Constants() {
28
    // Instantiation is prohibited
315
    // Instantiation is prohibited
29
  }
316
  }
30
}
317
}
client/src/main/java/org/apache/sqoop/client/shell/CloneCommand.java
Revision 847a6ad New Change
 
client/src/main/java/org/apache/sqoop/client/shell/CloneConnectionFunction.java
Revision 21c41aa New Change
 
client/src/main/java/org/apache/sqoop/client/shell/CloneJobFunction.java
Revision b0e8d90 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/CreateCommand.java
Revision 2453543 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java
Revision 4df1c71 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/CreateJobFunction.java
Revision 3aa6c4f New Change
 
client/src/main/java/org/apache/sqoop/client/shell/DeleteCommand.java
Revision bb09bf3 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/DeleteConnectionFunction.java
Revision ee2a1cf New Change
 
client/src/main/java/org/apache/sqoop/client/shell/DeleteJobFunction.java
Revision acc8e21 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/HelpCommand.java
Revision 03499d8 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SetCommand.java
Revision 20c8090 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SetOptionFunction.java
Revision 3764306 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SetServerFunction.java
Revision daf1ff4 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowCommand.java
Revision bd74253 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
Revision 4e49288 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowConnectorFunction.java
Revision 3116cd9 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowFrameworkFunction.java
Revision 8dcf976 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java
Revision ee8c63d New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowServerFunction.java
Revision 039e28b New Change
 
  1. client/src/main/java/org/apache/sqoop/client/core/Constants.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/CloneCommand.java: Loading...
  3. client/src/main/java/org/apache/sqoop/client/shell/CloneConnectionFunction.java: Loading...
  4. client/src/main/java/org/apache/sqoop/client/shell/CloneJobFunction.java: Loading...
  5. client/src/main/java/org/apache/sqoop/client/shell/CreateCommand.java: Loading...
  6. client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java: Loading...
  7. client/src/main/java/org/apache/sqoop/client/shell/CreateJobFunction.java: Loading...
  8. client/src/main/java/org/apache/sqoop/client/shell/DeleteCommand.java: Loading...
  9. client/src/main/java/org/apache/sqoop/client/shell/DeleteConnectionFunction.java: Loading...
  10. client/src/main/java/org/apache/sqoop/client/shell/DeleteJobFunction.java: Loading...
  11. client/src/main/java/org/apache/sqoop/client/shell/HelpCommand.java: Loading...
  12. client/src/main/java/org/apache/sqoop/client/shell/SetCommand.java: Loading...
  13. client/src/main/java/org/apache/sqoop/client/shell/SetOptionFunction.java: Loading...
  14. client/src/main/java/org/apache/sqoop/client/shell/SetServerFunction.java: Loading...
  15. client/src/main/java/org/apache/sqoop/client/shell/ShowCommand.java: Loading...
  16. client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java: Loading...
  17. client/src/main/java/org/apache/sqoop/client/shell/ShowConnectorFunction.java: Loading...
  18. client/src/main/java/org/apache/sqoop/client/shell/ShowFrameworkFunction.java: Loading...
  19. client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java: Loading...
  20. client/src/main/java/org/apache/sqoop/client/shell/ShowServerFunction.java: Loading...
This diff has been split across 2 pages: 1 2 >