Unable to find pyspark testing module - apache-spark

Although, in source code in github I see pyspark.testing module being present, however, my local environment is throwing error that pyspark.testing is not found.
https://github.com/apache/spark/blob/master/python/pyspark/testing/sqlutils.py#L27
(Source Code)
Have installed pyspark as
pip install pyspark
Folder structure inside pyspark module in conda environment:
d---- 6/2/2022 12:15 PM bin
d---- 6/2/2022 12:15 PM cloudpickle
d---- 6/2/2022 12:15 PM data
d---- 6/2/2022 12:15 PM examples
d---- 6/2/2022 12:15 PM jars
d---- 6/2/2022 12:15 PM licenses
d---- 6/2/2022 12:15 PM ml
d---- 6/2/2022 12:15 PM mllib
d---- 6/2/2022 12:15 PM pandas
d---- 6/2/2022 12:15 PM python
d---- 6/2/2022 12:15 PM resource
d---- 6/2/2022 12:15 PM sbin
d---- 6/2/2022 12:15 PM sql
d---- 6/2/2022 12:15 PM streaming
Although all other folders from git repo are present, however, testing folder is not present.
Installed pyspark version
pyspark==3.2.1

Related

How to generate a service using generate-odata-client from an ECC or S4 using the service's $metadata?

I'm trying to convert a $metadata into a service for use with the SAP Cloud SDK Library.
generate-odata-client --inputDir .\ctradeslipdata_metadata.xml --outputDir tradeslipdata
Error
[2022-06-10T01:36:13.788Z] ERROR (generator-cli): ErrorWithCause: Generation of services failed.
at C:\Users\Avell\AppData\Roaming\nvm\v14.17.0\node_modules\#sap-cloud-sdk\generator\dist\generator-cli.js:22:18
Caused by:
Error: EEXIST: file already exists, mkdir 'D:\PESSOAL\PROGRAMACAO\JS\nest\exemplo-api-btp\ctradeslipdata_metadata.xml'
estruct
d---- dist
d---- node_modules
d---- src
d---- test
d---- tradeslipdata
-a--- 77 .env
-a--- 20 .eslintignore
-a--- 681 .eslintrc.js
-a--- 49 .gitignore
-a--- 51 .prettierrc
-a--- 62594 ctradeslipdata_metadata.xml
-a--- 5742 default-env.json
-a--- 443 manifest.yml
-a--- 220 nest-cli.json
-a--- 3107 package.json
-a--- 97 tsconfig.build.json
-a--- 581 tsconfig.json
-a--- 317412 yarn.lock
Your command uses an option --inputDir, which needs a directory path as parameter. However, you passed a file, which should be fixed.
Please check the complete documentation of the generator here.

Flutter packages not recognised in Android Studio

Flutter(1.22.5) packages are not recognized in Android Studio(Windows-10(64bit)),eventhough they are available in the "C:\src\flutter\packages\flutter\lib" directory.
How to resolve this?
Flutter path - C:\src\flutter
DartSdk path - C:\src\flutter\bin\cache\dart-sdk
Packages -
C:\src\flutter>cd "C:\src\flutter\packages\flutter\lib"
C:\src\flutter\packages\flutter\lib>dir
Volume in drive C has no label.
Volume Serial Number is 2EAF-73E1
Directory of C:\src\flutter\packages\flutter\lib
16-Dec-20 04:43 PM <DIR> .
16-Dec-20 04:43 PM <DIR> ..
16-Dec-20 04:43 PM 3,076 analysis_options_user.yaml
16-Dec-20 04:43 PM 9,707 animation.dart
16-Dec-20 04:43 PM 2,024 cupertino.dart
16-Dec-20 04:43 PM 1,777 foundation.dart
16-Dec-20 04:43 PM 1,216 gestures.dart
16-Dec-20 04:43 PM 6,018 material.dart
16-Dec-20 04:43 PM 2,464 painting.dart
16-Dec-20 04:43 PM 677 physics.dart
16-Dec-20 04:43 PM 3,170 rendering.dart
16-Dec-20 04:43 PM 694 scheduler.dart
16-Dec-20 04:43 PM 707 semantics.dart
16-Dec-20 04:43 PM 1,664 services.dart
16-Dec-20 04:43 PM <DIR> src
16-Dec-20 04:43 PM 5,308 widgets.dart
13 File(s) 38,502 bytes
3 Dir(s) 27,227,918,336 bytes free
main.dart -
import 'package:flutter/material.dart';
import 'C:\src\flutter\packages\flutter\lib\material.dart';
ERROR -
Error: Could not resolve the package 'flutter' in 'package:flutter/material.dart'.
^
lib/main.dart:6:8: Error: Not found: 'package:flutter/material.dart'
import 'package:flutter/material.dart';
^
lib/main.dart:7:8: Error: Error when reading 'c:src%0Clutterpackages%0Clutterlibmaterial.dart': StandardFileSystem only supports file:* and data:* URIs
import 'C:\src\flutter\packages\flutter\lib\material.dart';
The original project was created by downloading Flutter via Git ,maybe the latest Flutter version has some bugs.
Downloading Flutter stable version from the official website solved the issue.

How to clear diagnostic logs on Azure Web Apps when using the Local Cache feature?

I'm currently hosting a ASP.NET MVC Web app on Azure's App Service offering and have optionally opted into use their App Service Local Cache feature since my app does not need to write to the local file system.
This has improved the performance of my web app but I've come to realise that it fills up the local File System very quickly when a file system despite having the app setting "WEBSITE_HTTPLOGGING_RETENTION_DAYS": "2" with a quota of 99MB (not sure why I can't see this in AppSettings?) set on App > Diagnostic Logs area.
The documentation says it does modify the way logfiles are stored but doesn't mention how to remove them.
Web apps can continue to write log files and diagnostic data as they do currently. Log files and data, however, are stored locally
on the VM. Then they are copied over periodically to the shared
content store. The copy to the shared content store is a best-case
effort--write backs could be lost due to a sudden crash of a VM
instance.
There is a change in the folder structure of the LogFiles and Data folders for web apps that use Local Cache. There are now subfolders
in the storage LogFiles and Data folders that follow the naming
pattern of "unique identifier" + time stamp. Each of the subfolders
corresponds to a VM instance where the web app is running or has run.
This has been confirmed by by a quick Powershell command on the Kudu Console on the D:\home\logfiles directory.
PS D:\home\logfiles> Get-ChildItem | Sort LastWriteTime
Get-ChildItem | Sort LastWriteTime
Mode LastWriteTime Name
---- ------------- --------------------------
d----- 11/28/2017 1:52 AM http
d----- 11/28/2017 4:42 AM kudu
d----- 11/28/2017 4:46 AM SiteExtensions
d----- 12/1/2017 1:26 AM Application
d----- 12/1/2017 1:26 AM Monaco
d----- 3/7/2018 3:37 PM 5198ab_18_03_03_06_28_59
d----- 3/7/2018 4:03 PM 907c1a_18_03_06_06_44_22
d----- 3/8/2018 3:59 PM 5198ab_18_03_07_14_25_08
d----- 3/8/2018 3:59 PM ff0fc5_18_03_07_11_46_16
d----- 3/8/2018 4:02 PM 0c1a69_18_03_07_08_14_26
d----- 3/8/2018 4:03 PM a9316b_18_03_08_04_25_31
d----- 3/9/2018 4:02 PM 5e5ff2_18_03_08_08_44_41
d----- 3/9/2018 4:02 PM c87157_18_03_09_03_50_23
d----- 3/10/2018 6:18 AM 0c1a69_18_03_09_18_29_49
d----- 3/10/2018 10:32 AM 1440de_18_03_09_11_09_37
... <Excluded for brevity>
... <Excluded for brevity>
d----- 7/31/2018 12:33 PM fe780a_18_07_30_03_36_41
d----- 7/31/2018 4:02 PM f713f0_18_07_31_04_13_17
d----- 7/31/2018 4:03 PM 2a1ef5_18_07_30_23_18_41
d----- 8/1/2018 4:17 PM 7254a1_18_07_31_08_14_27
d----- 8/1/2018 4:18 PM c01540_18_08_01_02_17_00
d----- 8/1/2018 4:18 PM bcecd7_18_07_31_09_41_33
d----- 8/1/2018 4:18 PM 11e825_18_07_31_16_28_38
d----- 8/2/2018 6:18 AM 2ee8db_18_08_01_17_19_18
d----- 8/2/2018 6:18 AM 6ba224_18_08_01_04_13_34
d----- 8/2/2018 10:33 AM dca085_18_08_01_04_14_00
d----- 8/2/2018 10:33 AM 6ead4a_18_08_01_11_08_46
d----- 8/2/2018 12:32 PM 4c87a3_18_08_02_00_07_21
d----- 8/2/2018 12:33 PM faf4de_18_07_28_16_57_44
d----- 8/2/2018 4:21 PM 46b00f_18_07_31_23_36_35
d----- 8/2/2018 4:21 PM 52a38c_18_08_01_11_02_26
d----- 8/3/2018 12:33 PM bcecd7_18_08_01_07_50_23
d----- 8/3/2018 4:02 PM 8eac1e_18_08_03_02_32_24
d----- 8/5/2018 2:35 PM 2341b7_18_08_03_04_15_08
d----- 8/6/2018 12:16 AM 0d1e3e_18_08_02_09_30_34
d----- 8/6/2018 12:17 AM 540bec_18_08_01_10_02_30
d----- 8/6/2018 11:04 AM 3952e0_18_08_05_20_58_56
d----- 8/6/2018 11:59 AM NewRelic
My Environment settings are
"WEBSITE_LOCAL_CACHE_OPTION" : "Always"
"WEBSITE_LOCAL_CACHE_SIZEINMB" : "1800"
"WEBSITE_HTTPLOGGING_RETENTION_DAYS": "2"
"WEBSITE_LOCALCACHE_READY": "TRUE"
So the questions are
1) How do I remove periodically remove the "unique identifier" + time stamp folders e.g. 3952e0_18_08_05_20_58_56?
2) How can I make it respect my diagnostic settings e.g. Retention of 2 days with a maximum quota of 99MB?

How to install after downloading the files?

I have downloaded numpy-1.4.0rc2.zip from sourceforge and have expanded the contents to a folder:
Directory: D:\temp\numpy-1.4.0rc2
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 9/10/2015 13:47 doc
d---- 9/10/2015 13:48 numpy
-a--- 9/10/2015 13:47 1620 COMPATIBILITY
-a--- 9/10/2015 13:47 687 DEV_README.txt
-a--- 9/10/2015 13:47 4732 INSTALL.txt
-a--- 9/10/2015 13:47 1543 LICENSE.txt
-a--- 9/10/2015 13:47 785 MANIFEST.in
-a--- 9/10/2015 13:47 1613 PKG-INFO
-a--- 9/10/2015 13:47 783 README.txt
-a--- 9/10/2015 13:47 5989 setup.py
-a--- 9/10/2015 13:47 149 setupegg.py
-a--- 9/10/2015 13:47 4161 setupscons.py
-a--- 9/10/2015 13:47 154 setupsconsegg.py
-a--- 9/10/2015 13:47 5010 site.cfg.example
-a--- 9/10/2015 13:47 3109 THANKS.txt
INSTALL.txt and README.txt do not offer any installation instructions. What should the next step be? I tried python setup.py but got:
ImportError: No module named '__builtin__'
I am using Python 3.4 on Windows 10.

Nothing happens when I tried to run liferay 6.1.1. on a existing Tomcat 7 server

Any help will be welcome.
I followed this tutorial steps, trying to run liferay 6.1.1. on a existing tomcat, but nothing happens when I launch tomcat server.
Server's log message (see), seems to be normal, but every tomcat default app is loaded, except liferay's war file. When I hit localhost:8080/, all I receive is a nice 404 status!
//Tomcat logs:
Nov 14, 2012 3:10:22 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/cbs_sp/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Nov 14, 2012 3:10:23 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Nov 14, 2012 3:10:23 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Nov 14, 2012 3:10:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1991 ms
Nov 14, 2012 3:10:23 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 14, 2012 3:10:23 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.32
Nov 14, 2012 3:10:23 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /Cesar/Profissional/Projetos/Meu/Java/Liferay/Server/liferay_home/apache-tomcat-7.0.32/conf/Catalina/localhost/ROOT.xml
Nov 14, 2012 3:10:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Cesar/Profissional/Projetos/Meu/Java/Liferay/Server/liferay_home/apache-tomcat-7.0.32/webapps/docs
Nov 14, 2012 3:10:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Cesar/Profissional/Projetos/Meu/Java/Liferay/Server/liferay_home/apache-tomcat-7.0.32/webapps/examples
Nov 14, 2012 3:10:27 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Cesar/Profissional/Projetos/Meu/Java/Liferay/Server/liferay_home/apache-tomcat-7.0.32/webapps/host-manager
Nov 14, 2012 3:10:27 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Cesar/Profissional/Projetos/Meu/Java/Liferay/Server/liferay_home/apache-tomcat-7.0.32/webapps/manager
Nov 14, 2012 3:10:27 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Nov 14, 2012 3:10:27 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Nov 14, 2012 3:10:27 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4691 ms
Any idea about what might be happening?
Or, where I can start?
Thanks in advance,
*** Additional info added ****
//Terminal:
[Cesars-Computer: apache-tomcat-7.0.32] $ cd webapps/
[Cesars-Computer: webapps] $ ls -la
total 0
drwxr-xr-x# 7 cbs_sp admin 238 Oct 3 04:52 .
drwxr-xr-x# 13 cbs_sp admin 442 Nov 7 17:09 ..
drwxr-xr-x# 4 cbs_sp admin 136 Nov 13 12:53 ROOT
drwxr-xr-x# 52 cbs_sp admin 1768 Oct 3 04:52 docs
drwxr-xr-x# 7 cbs_sp admin 238 Oct 3 04:52 examples
drwxr-xr-x# 7 cbs_sp admin 238 Oct 3 04:52 host-manager
drwxr-xr-x# 8 cbs_sp admin 272 Oct 3 04:52 manager
[Cesars-Computer: webapps] $ cd ROOT
[Cesars-Computer: ROOT] $ ls -la
total 348080
drwxr-xr-x# 4 cbs_sp admin 136 Nov 13 12:53 .
drwxr-xr-x# 7 cbs_sp admin 238 Oct 3 04:52 ..
-rw-r--r--# 1 cbs_sp admin 6148 Nov 13 12:53 .DS_Store
-rw-r--r--# 1 cbs_sp admin 178206477 Nov 7 14:46 liferay-portal-6.1.1-ce-ga2-20120731132656558.war
Solved!
If anyone faced this same problem, just change the name of the .war to ROOT.war, and put it under webapps/ directory, it will work fine!
And If you are following the steps from Liferay site, as I did. At some point the tutorial will tell you to create a ROOT.xml, when you do that, just add the Context parent node, which, until the moment I wrote this, was not mentioned in the tutorial example's snippet.
My ROOT.xml:
[Cesars-Computer: apache-tomcat-7.0.32] $ cd conf/Catalina/localhost/
[Cesars-Computer: localhost] $ cat ROOT.xml
<Context path="" crossContext="true">
</Context>
Thanks and success to everyone,

Resources